[SOLVED] I don't want to display empty menu if current language is not ready!

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

[SOLVED] I don't want to display empty menu if current language is not ready!

Post by percusionista »

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:
{* 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}
What is wrong in it and how should it be right

thanks
Last edited by percusionista on Sun Nov 25, 2007 10:39 pm, edited 1 time in total.
alby

Re: inML I don't want to display empty menu items if current language is not rea

Post by alby »

percusionista wrote: 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 error text?

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: inML I don't want to display empty menu items if current language is not rea

Post by percusionista »

this is the error message instead that menu in page:
string(83) "Smarty error: unable to read resource: "module_file_tpl:MenuManager;CSSml_menu.tpl""

this is the way I insert in page template:
      {* Start Navigation *}

     

        Navigation

        {menu template='CSSml_menu.tpl'}

     

     

      {* End Navigation *}
Of course I have saved the menu template, and appear in Menu Manager module in Database Templates,  as :      CSSml_menu
Last edited by percusionista on Sun Nov 25, 2007 5:42 pm, edited 1 time in total.
alby

Re: inML I don't want to display empty menu items if current language is not rea

Post by alby »

percusionista wrote: this is the error message instead that menu in page:
string(83) "Smarty error: unable to read resource: "module_file_tpl:MenuManager;CSSml_menu.tpl""
If you have the name CSSml_menu, you MUST call module with {menu template="CSSml_menu"} and not {menu template="CSSml_menu.tpl"}

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

inML I don't want to display empty menu items if current language is not rea

Post by percusionista »

O.K. Solved

Works great

thank you
Post Reply

Return to “CMSMS Core”