all_day Conditional not working
In my template I have:
{if event_date_time:all_day != 'y'}{event_date_time:start_time format="%H:%i"} - {event_date_time:end_time format="%H:%i"}
But I get the dash whether or not it's an all day event. Have I missed something?
EE 2.9.2
LE 1.5.1
Replies
Low 19 Aug 2016 14:09
Are you closing the conditional?
Nick 19 Aug 2016 14:16
I am:
{if event_date_time:all_day != 'y'}{event_date_time:start_time format="%H:%i"} - {event_date_time:end_time format="%H:%i"}{/if}
Low 19 Aug 2016 14:19
There *might* be a bug in EE's template parser in that version of EE, if I recall correctly.
Try this as your opening conditional.
Nick 19 Aug 2016 14:23
Ah, of course! Thank's Low - much appreciated!
Low 19 Aug 2016 14:25
Note that that syntax is *not* the recommended way. It's only because of a bug in EE that you need to use it like that. When you upgrade EE, you should revert the conditional to the previous syntax.
Nick 19 Aug 2016 16:27
Noted, thank you.