core
core copied to clipboard
Improvement - make navtool take a level
Here is the use case, you are trying to build a side or sub menu and you need it to start on a specific level,say level 2. Our old navigation macro used to allow you to pass a starting level, but our new navtool does not. We need something that we can do the following, where passing a 1 returns the first sub level (the folder) in which the nav is being called.
#set($subnav = $navtool.getNav(1))
#foreach($item in $subNav.children)
<li>$item.title</li>
#end
To test:
$navtool.getNav(0)<br>
$navtool.getNav(1)<br>
$navtool.getNav(2)<br>
$navtool.getNav(3)<br>
PR: https://github.com/dotCMS/core/pull/8007
Fix is working. Tested on dotcms 3.3 build // Win7 Pro SP1 // SQLServer 2012 // Firefox
Fix is working. Tested on dotcms 3.3 build // Win7 Pro SP1 // SQLServer 2012 // Firefox