EllisLab text mark
Advanced Search
     
Unix timestamp in Global Variable
Posted: 08 May 2012 08:11 AM   [ Ignore ]
Joined: 2008-02-19
77 posts

This question may be related to a resolved thread.

Just trying to correct the formatting of a conditional - I am comparing a trying to compare a publish date to a specific date and determine a url based on that - so the following works:

{if {entry_date format="%U"1335776400 } 

...but I cant get the comparison working with the global variable - using any form of apostrophes (or none) 

{if {entry_date format="%U"{url_switch} } 

Any suggestions appreciated…

thanks
Kevin

 

 
Posted: 09 May 2012 12:04 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2011-11-25
7174 posts

Hey kev_horan,

Thank you for posting your question here on the ExpressionEngine forums.

I am afraid that you are running into Parse Order!

The conditional is being parsed before the global variable, so that is why it’s failing. :-(

I hope this helps!

Cheers,

 Signature 

Recent version: EE 2.5.4 | Forum Module 3.1.10 | MSM 2.1.4 | 2.x Bug Tracker | Version Upgrade