ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Unix timestamp in Global Variable

May 08, 2012 8:11am

Subscribe [2]
  • #1 / May 08, 2012 8:11am

    kev_horan

    50 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

     

  • #2 / May 09, 2012 12:04pm

    Shane Eckert

    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,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases