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.

Comparison Operators not behaving as expexted

December 17, 2012 1:03pm

Subscribe [1]
  • #1 / Dec 17, 2012 1:03pm

    design132

    101 posts

    Just curious why the below scenario isn’t working.  My markup should be correct… am I missing something?  If it’s before the entry date, then nothing shows, if it’s after it, then “sorry, no video shows” but it never shows the video.  Doesn’t appear as though the comparison operators are even being observed!

    {exp:channel:entries status="open|Sticky" channel="sunday_videos" orderby="date" sort="desc" }
    
    {if "{current_time format="%Y %m %d %H:%i:%s"}" >= "{entry_date format="%Y %m %d %H:%i:%s"}"}
    
           <iframe src="{vimeo}" width="500" height="375" frameborder="0" webkitAllowFullScreen     
           mozallowfullscreen allowFullScreen></iframe>
    
    {if:else}
            sorry, no video.
    {/if}
    
    {/exp:channel:entries }

    I have ensured my times are corect: 

    current time: 2012 12 17 11:26
    entry time:  2012 12 17 11:00


    Any help is greatly appreciated!

  • #2 / Dec 17, 2012 1:50pm

    design132

    101 posts

    *** DISREGARD ***

    I’m just going to use Solspace’s Calendar module instead.

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

ExpressionEngine News!

#eecms, #events, #releases