I am trying to set up an additional level of navigation for our site (4th level). This navigation section is displayed in a new div within the page content area. This div contains a special right hand slot that gets populated with callout content (picture, file links, contact information, etc…) and should be shared with the new navigation section.
What I am trying to do is set a variable from the leftnav macro script that will interpreted by the right slot macro to add the div to the page if fourth level navigation is needed or the right slot has contents to display.
Left navigation trigger:
#macro(thirdlevel $node)##
#getProps($node)##
#if ($landing_page != '#')##
li class="thirdlevel">
a class="$axis" href="${landing_page}">$title /a>
/li>
#if($submenu)##
#set($hasFourthLevel = 'True')##
#end##
#end##
#end##
Right slot/navigation code:
#initslot("erauRightSlot" "")##
#if($sys.currentslot.relresults.size() > 0 || $hasFourthLevel == 'True')##
div class='secondary_content'>
#slot("erauRightSlot" "" "" "" "" "")##
#slot("rffNav" "div id='fourthlevelNav'>" "" "" "/div>" "template=erauSnNavRight")##
/div>
#end##
My problem is that the “$hasFourthLevel” variable is not defined when it is read by the page template since it does not reside in the leftnav macro. Is there a way to do this or possibly an alternative method?