[SOLVED] I don't want to display empty menu if current language is not ready!
Posted: Sun Nov 25, 2007 12:38 am
Hi Alby
I´ve read your post explaining how to do it in a simple template
http://forum.cmsmadesimple.org/index.php/topic,15318.msg81169.html#msg81169
but when I try to do it in css menu template I have changed in this way (red color my insert) iy gives me a warnig error insted than menu:
thanks
I´ve read your post explaining how to do it in a simple template
http://forum.cmsmadesimple.org/index.php/topic,15318.msg81169.html#msg81169
but when I try to do it in css menu template I have changed in this way (red color my insert) iy gives me a warnig error insted than menu:
What is wrong in it and how should it be right{* CSS classes used in this template:
#menuwrapper - The id for the that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the
.menuparent - The class for each that has children.
.menuactive - The class for each that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if !empty($node->menutext)} {* for not showing menu in language if empty*}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
type != 'sectionheader' and $node->type != 'separator'}
href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}
{elseif $node->type == 'sectionheader'}
>{$node->hierarchy}: {$node->menutext}
{/if}
{/if} {* this is my other tag insert *}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
thanks