1
Dear All,
I am having problems running an if statement on the number of modules installed to decide whether to include them in the Main Menu block or not. I have modified the template as follows:
<{foreach item=module from=$block.modules}> {if {$module.name} eq "Web Links"} <{$module.name}> <{foreach item=sublink from=$module.sublinks}> <{/foreach}> <{/foreach}> {/if} |
,
the main change been the addition of {if {$module.name} eq "Web Links"}
This, as I look at it, will check the module's name and if it is equal to Web Links it will add it to the menu.
Also, would this logic be true if I want the opposite to happen?
{if ! {$module.name} eq "Web Links"}
However, nothing happens. Could someone please point me to where I am going wrong? I have experience in PHP programming, but am a Smarty newbie.
Thanks,
George