Page 1 of 1

simple_navigation makes sectionheaders, separators clickable

Posted: Tue May 24, 2016 1:46 pm
by dlen
Hi there,

this is actually a kind of bug report about the template simple_navigation shipped with 2.x.

Action: make a page "separator" or "sectionheader".

Expected result: menu item is not clickable, allows to open submenus though, in the case of "separators".

Experienced result:menu item is clickable, there is a "href='#'" - attribute in the a - tag. Click makes browser load the start page.

Cause and proposed remedy: the href - attribute is added to the template, if $writelink is set to true. This happens if $node_url has a value. So either make $node->url empty - which is out of my reach, or change the code in the template to:

Code: Select all

    {if $node->url and !$node->current and !$node->type == 'sectionheader' and !$node->type == 'separator'}
      {assign var='writelink' value=true}
    {/if}
cheers - - -

p.s. What is the right page to send bug reports like this one?

Re: simple_navigation makes sectionheaders, separators click

Posted: Tue May 24, 2016 10:06 pm
by dlen
The code i posted above is wrong, it must be

Code: Select all

    {if $node->url and !$node->current and $node->type != 'separator' and $node->type != 'sectionheader'}
      {assign var='writelink' value=true}
    {/if}
instead.