Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi all,

I am just having a couple of problems with a If / Else Statement comparing two values. I am unsure whether this is correct, or even possible. Any help would be greatly appreciated.

Code: Select all
<thead>
   <tr>
      <cms:set winter_open = "<cms:date winter_opening_time format='g.ia' />"/>
      <cms:set summer_open = "<cms:date summer_opening_time format='g.ia' />"/>
      <cms:set winter_closed = "<cms:date winter_closing_time format='g.ia' />"/>
      <cms:set summer_closed = "<cms:date summer_closing_time format='g.ia' />"/>
      <cms:if winter_open eq summer_open && winter_closed eq summer_closed>
         <th>&nbsp;</th>
         <th>All times</th>
            <cms:else/>
         <th>&nbsp;</th>
         <th>Winter times</th>
         <th>Summer times</th>
      </cms:if>
   </tr>
</thead>
Hi,
The syntax you are using is correct.
If you are not getting the expected result, echo out all the variables and make sure they have the values you were expecting.
2 posts Page 1 of 1