Page 1 of 1

CMSMS 2.0: No menu generated

Posted: Mon Sep 07, 2015 9:29 pm
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?

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 9:04 am
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 *}

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 11:41 am
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"

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 12:41 pm
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?

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 1:06 pm
by pschoenb
After changing the template again, the navigator tag is unknown again. No changes of the module config.

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 1:12 pm
by pschoenb
After deleting the cache, the tag is known again.

Re: CMSMS 2.0: No menu generated

Posted: Tue Sep 08, 2015 3:58 pm
by pschoenb
Ok, this one is solved, except that caching seems to be not fully reliable at times.