Hi everybody,
until now I only had navigations that used to expand the sub-items when clicked. Now I need a navigation where one part of the navigation is alwas expanded as such:
- One
- expanded-one
- expanded-two
- expanded-three
- Two
- Three
- Four
Just imagine that Two, Three and Four have also sub-elements that do only show up when you click on the parent element. However: One has to be kept open. Is there any way to achieve that with MenuManager? I can not use excludeprefix in this case or includeprefix for search-engine-reasons. Are there any alternatives? Maybe playing with alias or something like that? I have been looking through a lot of menu-templates but have not found any clue what to do now.
Regards,
Nils
[SOLVED] Menu question: One navigation always expanded
[SOLVED] Menu question: One navigation always expanded
Last edited by nils73 on Wed Oct 29, 2008 11:39 am, edited 1 time in total.
Re: Menu question: One navigation always expanded
Maybe one way would be to do it by CSS. With collapse=0 you could have all of the navi links open. Then if you add to you menutemplate to get alias printed on li class by {$node->alias}. Then with CSS you have the child ul open if it's parent li has "currentpage" "activeparent" or "page-alias-of-page-ONE".
Maybe does not work but just a thought.
Maybe does not work but just a thought.
Re: [SOLVED] Menu question: One navigation always expanded
KO, thank you for this great idea!
Solved it by applying "current" to the respective elements and by adding a simple if-statement to the menu itself. Now it works like it should and it is still dynamic. Great!
Regards,
Nils
Solved it by applying "current" to the respective elements and by adding a simple if-statement to the menu itself. Now it works like it should and it is still dynamic. Great!
Regards,
Nils
Re: [SOLVED] Menu question: One navigation always expanded
Ah ... by the way: To be seen here at Best of Accessibility, a german website about an accessibility event.
Thanks again for the help!
Thanks again for the help!
-
- New Member
- Posts: 8
- Joined: Fri Aug 11, 2006 6:59 pm
Re: [SOLVED] Menu question: One navigation always expanded
Nils,
I have noted your post and what you have done is exactly what I would like to do.
Can you post specific details of the files you have modified to achive this effect.
Regards
Alan
I have noted your post and what you have done is exactly what I would like to do.
Can you post specific details of the files you have modified to achive this effect.
Regards
Alan
.... as we know, there are known knowns; there are things we know we know.
We also know there are known unknowns; that is to say we know there are some things we do not know.
But there are also unknown unknowns - the ones we don't know we don't know.
DR 12 Feb 2002
We also know there are known unknowns; that is to say we know there are some things we do not know.
But there are also unknown unknowns - the ones we don't know we don't know.
DR 12 Feb 2002
Re: [SOLVED] Menu question: One navigation always expanded
Here is what I did:
Hope this helps.
Nils
Code: Select all
[color=blue]
{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->current == true}
<li class="current"><h3><dfn>Aktuelle Seite ist {$node->hierarchy}: </dfn>{$node->menutext}</h3>
{elseif $node->parent == true}
<li class="current"><a class="active" 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->hierarchy}: </dfn>{$node->menutext}</a>
{elseif $node->type == 'sectionheader'}
<li><strong class="section">{$node->menutext}</strong>
{elseif $node->type == 'separator'}
<li class="separator"><hr />
{else}
<li{if $node->alias == "boa2009"} class="current"{/if}><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}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}[/color]
Nils
-
- New Member
- Posts: 8
- Joined: Fri Aug 11, 2006 6:59 pm
Re: [SOLVED] Menu question: One navigation always expanded
Thanks Nils.
This will give me the logic I need to do the same for my navigation.
Alan
This will give me the logic I need to do the same for my navigation.
Alan
.... as we know, there are known knowns; there are things we know we know.
We also know there are known unknowns; that is to say we know there are some things we do not know.
But there are also unknown unknowns - the ones we don't know we don't know.
DR 12 Feb 2002
We also know there are known unknowns; that is to say we know there are some things we do not know.
But there are also unknown unknowns - the ones we don't know we don't know.
DR 12 Feb 2002