Hey Daine!
The entry level for the vertical navigation is calculated =>
info.magnolia.module.templatingkit.navigation.SiteNavigationModel._getVerticalNavigation().
I'm not quite sure I understand you correctly. In my case I have a fold-out
horizontal navigation. I have extended my template model and adapted the
horizontalNavigation.ftl.
Model:
public NavigationModel getSubNavigation(NavigationItem item) throws
RepositoryException
{
Content itemContent = item.getContent();
return new NavigationModel(itemContent, content, 1, false, false);
}
Template (Reduced to the required):
[#if model.navigation.showHorizontalNavigation]
[#assign navigation = model.navigation.horizontalNavigation/]
<div id="nav-global">
<h6>${i18n['structural.navigation']}</h6>
[@renderNavigation navigation=navigation subnavigation=true
ulClassName="nav"/]
</div>
[/#if]
[#macro renderNavigation navigation subnavigation ulClassName]
[#if navigation.items?has_content]
<ul>
[#list navigation.items as item]
<li${id}${cssClass}>
[#-- render link --]
[#if subnavigation]
[@renderNavigation navigation=model.getSubNavigation(item)
subnavigation=false ulClassName=""/]
[/#if]
</li>
[/#list]
</ul>
[/#if]
[/#macro]
This is obviously not my preferred way to implement this :)
I hope I could help you.
Regards, Patric
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Magnolia Forums (on behalf of Daine Trinidad)
Gesendet: Montag, 12. März 2012 19:22
An: Magnolia User List
Betreff: [magnolia-user] Re: How to enable second level horizontal menu?
Hi there, I believe this issue is similar to mine
http://forum.magnolia-cms.com/forum/thread.html?threadId=b2745dd2-5f87-4cad-a60e-b67f3eae97bc
but no one has answered it either.
I want to be able to enable two navigation levels, as I will make use of the
second level as a drop down menu through css (ie it opens when it's hovered,
but disappears when you're not hovering over its parent menu item). I also want
this second navigation level to appear on the vertical menu on the left when
its parent menu is selected / open.
Basically I want the second level menu to appear both in the horizontal menu
and the vertical menu at the same time. However, if I change the level of the
navigation menu (site config > templates > prototype > horizontal > level) to
2, the vertical menu disappears (ie I believe it starts with the level after
the max level of the horizontal menu). So if I only have 2 levels, the vertical
menu doesn't show up if I have an item from level 1 open.
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=5f9cf6a3-c077-4130-adbb-d09833d6611d
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------