[CTLModulemaker (or general smarty) is_'not'selected
Posted: Mon Sep 14, 2009 2:58 pm
I don't know if this is a CTLModulemaker specific question, of more a general smarty question.
I've made a module with CTLModulemaker and noticed that there is a smarty variable called: $item->is_selected.
I want to use this in my template but I want to show something also when NO/0 item/s is/are selected.
I now have the code
No I want to show alternative content when no items are selected; (!) note: I don't want to show the not-selected items (because that would result in showing all items).
I've made a module with CTLModulemaker and noticed that there is a smarty variable called: $item->is_selected.
I want to use this in my template but I want to show something also when NO/0 item/s is/are selected.
I now have the code
Code: Select all
{foreach from=$itemlist item="item"}
{if $item->is_selected}
........
{/if}
{/forwach}