99
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:
<table cellspacing="0">
<tr>
<td id="mainmenu">
<a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
<!-- start module menu loop -->
<{foreach item=module from=$block.modules}>
{if {$module.name} eq "Web Links"}
<a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
<{foreach item=sublink from=$module.sublinks}>
<a class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
<{/foreach}>
<{/foreach}>
{/if}
<!-- end module menu loop -->
</td>
</tr>
</table>
</tr>
</table>,
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