templates and nav that changes based on current selection (class="current)
I need to build a template. The template has a menu navigation that has 4 top level items and 3 of the 4 top level items have submenu items.
My first instinct is that the nav should not be in an editable region so that any changes to the template's main navigation will replicate to all the other pages in the site.
However there is also a class that I want to use within the nav. The class is called "current" and it underlines the top level navigation menu item to show that a page in that top level menu item is selected.
That means I have to place class="current" within the menu navigation to highlight the currently selected top level menu item. So that makes me think I have to put the main navigation in an editable region but if I do that and I need to add/change/remove a menu item in the main navigation then I have to manually do it to every page in the site instead of relying on the template to replicate the change.
How can this dilemma be solved?
<nav role="navigation" aria-label="Main" id="nav-main" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement" class="main show-for-large dropdown">
<ul class="row pad">
<li class="show-on-sticky home"><a href="/index.html">Home</a></li><li class="first"><a href="about.html" class="current">About</a>
<ul>
<li><a href="leadership/index.html">Leadership</a></li>
<li><a href="_assets/doc/treasurer-orgchart.pdf">Org Chart</a></li>
</ul>
</li>
