Page 1 of 1
Sectionheader anders als op subpagina
Posted: Wed Mar 20, 2013 7:41 am
by timdebuurman
Hoi,
Ik heb een parent pagina als section header ingesteld.
Zodra ik op een subpagina daarvan ben, is die knop opeens geen section header meer, het enige is dan dat de link nergens heen gaat.
HTML-output normaal:
Code: Select all
<li class="sectionheader"><span>Naam</span>
<ul> .. enz
Zodra ik op 1 van de sub-pagina's onder die sectionheader ben, is de HTML zo:
Code: Select all
<li class="menuactive menuparent parent"><a class="menuactive menuparent parent" href="#"><span>Naam</span></a>
<ul> .. enz
Lijkt me toch niet de bedoeling..
Zou het een fout zijn?
Re: Sectionheader anders als op subpagina
Posted: Wed Mar 20, 2013 9:33 am
by Rolf
Welk menu template gebruik je?
Re: Sectionheader anders als op subpagina
Posted: Wed Mar 20, 2013 10:47 am
by timdebuurman
Ik heb de 'simple_navigation' wat aangepast, om er een div bij te plaatsen.
Die div zorgt voor een achtergrond die inschuift als de muis erop gaat.
Dit is de template nu:
Code: Select all
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}
{assign var='number_of_levels' value=10000}
{if isset($menuparams.number_of_levels)}
{assign var='number_of_levels' value=$menuparams.number_of_levels}
{/if}
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" 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 or $node->current == true}
{assign var='classes' value='menuactive'}
{if $node->parent == true}
{assign var='classes' value='menuactive menuparent'}
{/if}
{if $node->children_exist == true and $node->depth < $number_of_levels}
{assign var='classes' value=$classes|cat:' parent'}
{/if}
<li class="{$classes}"><a class="{$classes}" href="{$node->url}"><span>{$node->menutext}</span><div class="bg"></div></a>
{elseif $node->children_exist == true and $node->depth < $number_of_levels and $node->type != 'sectionheader' and $node->type != 'separator'}
<li class="parent"><a class="parent" href="{$node->url}"><span>{$node->menutext}</span><div class="bg"></div></a>
{elseif $node->current == true}
<li class="currentpage"><h3><span>{$node->menutext}</span><div class="bg"></div></h3>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span><div class="bg"></div>
{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
{else}
<li><a href="{$node->url}"><span>{$node->menutext}</span><div class="bg"></div></a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
De website:
www.madcam.nl
Re: Sectionheader anders als op subpagina
Posted: Thu Mar 21, 2013 8:30 am
by Rolf
Uhm, dit zou ook wel eens een bug kunnen zijn... Zag dat Calguy hier iets veranderd heeft in de SVN. Als je geen haast hebt wacht even tot dit weekend. Als het goed is komt dan 1.11.5 uit.
grt. Rolf