CMSMS 2.0: No menu generated

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Locked
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

CMSMS 2.0: No menu generated

Post by pschoenb »

Hello,

my page template contains:

Code: Select all

<div id="avmenu">
        {menu start_level="2"}
</div>
I added the following menu template to my design (Type "Navigator::Navigation"):

Code: Select all

{if $count > 0}
<ul class="nav nav-stacked">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul class=\"nav nav-stacked\">" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}


{if $node->parent == true}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->pagetitle}</dfn>{$node->menutext}</a>

{elseif $node->current == true and $node->haschildren == true}
<li><p class="active">{$node->menutext}</p>

{elseif $node->haschildren == true}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>{$node->menutext}</a>

{elseif $node->current == true}
<li class="active"><p>{$node->menutext}</p>

{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />

{else}
<li><a 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 != ''} target="{$node->target}"{/if}>{$node->menutext}</a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
But I get:

Code: Select all

    <div id="avmenu">
                        <!-- MenuManager is not a plugin module -->

    </div>
What am I doing wrong?
Regards,
Patrick
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: CMSMS 2.0: No menu generated

Post by velden »

Please use the {Navigator} tag in stead of {menu}

http://docs.cmsmadesimple.org/introducing-cmsms-2-0
The Navigator module

The Navigator module is the new module use to generate navigations on the front of the website. Like the MenuManager module, it uses the content page tree as its basis for data, and Smarty templates to form that data into an HTML Navigation.

Unlike the MenuManager module, this module generates and provides to Smarty a hierarchical dataset. This dataset can be used recursively within Smarty. This makes the navigation templates more simple and more logical to understand. It also allows for advanced functionality like giving special classes based on the first or last child of an item, its index, and its depth.

This module does not have an admin interface. The Design Manager module manages the templates for the Navigator module, and there are no other settings. It supports the same options as the MenuManager module and provides breadcrumb functionality as well.
From sample template (Minimal):

Code: Select all

      {* Start Navigation *}
      <div style="float: left; width: 25%;">
         {Navigator loadprops=0 template='minimal_menu'}
      </div>
      {* End Navigation *}
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

Re: CMSMS 2.0: No menu generated

Post by pschoenb »

Now, that is weird. The Navigator module installs fine, but still I get:

Code: Select all

Syntax error in template "tpl_body:17"  on line 37 "{navigator template="accessible_simple_menu" start_level="2"}" unknown tag "navigator"
Regards,
Patrick
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

Re: CMSMS 2.0: No menu generated

Post by pschoenb »

Ok, the Navigator tag itself is recognized now. But instead of the menu, I get:

Code: Select all

                    
                    <div id="avmenu">
                        accessible_simple_menu




Simple menu
               	    </div>
Do I have to adapt my menu template above somehow?
Regards,
Patrick
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

Re: CMSMS 2.0: No menu generated

Post by pschoenb »

After changing the template again, the navigator tag is unknown again. No changes of the module config.
Regards,
Patrick
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

Re: CMSMS 2.0: No menu generated

Post by pschoenb »

After deleting the cache, the tag is known again.
Regards,
Patrick
pschoenb
Forum Members
Forum Members
Posts: 92
Joined: Sun Jul 15, 2007 1:18 pm

Re: CMSMS 2.0: No menu generated

Post by pschoenb »

Ok, this one is solved, except that caching seems to be not fully reliable at times.
Regards,
Patrick
Locked

Return to “The Lounge”