Well, I'm trying to make a navigation menu for a website that takes automatically its values from the folders structure of the website. I'm using opencms navigation tags. The structure is something like:
- Menu1
- Menu2
- Submenu 2.1
- Submenu 2.2
- Submenu 2.2.1
- Submenu 2.3 .....
What I want is to get all the elements to be able to display always the same menu, no matter the level you are inside at that moment, with the submenus in a dropdown way.
The problem is that I'm only able to display elements from the same level you are in through "forFolder" tag. Or I can display the whole tree (with "treeForFolder"), but also just until the level you are in, e.g. if you are at Submenu2.2, it won't display Submenu 2.2.1...
<cms:navigation type="treeForFolder" var="nav" startLevel="2" endLevel="5"/>
<ul class="nav navbar-nav">
<c:forEach items="${nav.items}" var="elem">
<li><a href="<cms:link>${elem.resourceName}</cms:link>" class="${clase}">${elem.navText}</a></li>
</c:forEach>
</ul>
How could I achieve my purpose? StartLevel and EndLevel params won't change anything, because it will display just until your current level of navigation.
I would like to do it using cms nav tags, and not directly through java.
Thanks in advance!