I'm working on a site that is bigger than most sites I've worked on and I'm having troubles understanding how to properly implement subitems in navigation to only show the ones that apply.
For Example Navigation when on a main About Page (HOME>>About>>Child Pages):
Full Left Navigation on the About Page:
- Fast Facts
- Welcome Letter
- Board of Trustees
- Meeting Notes
- Finance Info
- Resolutions
- Organization Charts
- Org Section 1
- Org Section 2
- Org Section 3
- Calendar
So I have no problem displaying all the links in the left nav. However, what I'm trying to do is when I'm on the Board of Trustees page/sub pages I would want it to look like this (note: without the sub pages of Organization Charts showing and when on the Org Charts to not have the Board sub pages showing):
- Fast Facts
- Welcome Letter
- Board of Trustees
- Meeting Notes
- Finance Info
- Resolutions
- Organization Charts
- Calendar
Is this possible without having to create a custom template for each section? It seems there would be a way, I'm just confused on how to implement it. I looked at this page: https://docs.grabaperch.com/templates/navigation/ and can see how to see if subitems exist, but can't find an example of how you would implement it with the following:
Template:
<?php perch_pages_navigation(array(
'from-path'=>'/about-us/',
'template' => array('left_nav.html'),
'levels'=>2
)); ?>
left_nav:
<perch:before>
<ul id="left-nav">
</perch:before>
<li<perch:if exists="current_page"> class="selected"</perch:if><perch:if exists="ancestor_page"> class="ancestor"</perch:if>>
<a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /></a>
<perch:pages id="subitems" encode="false" />
</li>
<perch:after>
</ul>
</perch:after>
Thanks in advance for help.