Problem with conditionality
Posted: Fri May 30, 2008 9:13 pm
Im trying to learn Smarty better. I have following template for Eventslisting module:
The obvious meaning is that if event ends in the past, the event shouldn't be displayed. I have events showed in attachment. 1. event should be displayed, while second shouldn't. But it doesn't work. If it's , then all events are displayed, in opposite case none are displayed.
What am I doing wrong?
Code: Select all
{foreach from=$items item="item"}
{if $item.end > $smarty.now}
<h3>{$item.short}</h3>
{/if}
{/foreach}
Code: Select all
{if $item.end < $smarty.now}
What am I doing wrong?