Forums / Setup & design / Inconsistent if statement behaviour / Comment26575
James Ward
Tuesday 29 July 2008 10:39:25 am
Whoops. Accidently cut and pasted some of my testing code. Here is the original code which works fine in my html template but breaks in a pdf template:
{if and(ne($event.data_map.start_date.content.timestamp,$event.data_map.end_date.content.timestamp),$event.data_map.end_date.has_content)} {def $event_date = concat($event.data_map.start_date.content.timestamp|datetime( 'custom', '%M %d, %Y' ),' - ',$event.data_map.end_date.content.timestamp|datetime( 'custom', '%M %d, %Y' ))} {else} {def $event_date = $event.data_map.start_date.content.timestamp|datetime( 'custom', '%M %d, %Y' )} {/if}
working at www.wardnet.com blogging at www.jamesward.ca