We are trying to build a reusable template that will render the LOCAL navigation for the current tome-managed page wherever it is embedded.
To generate the nav list, we are using the exp:static_tome_path expression which is creating a nested list. Because we are using category names in our URLs, we cannot rely on dynamically setting the starting page from which to build the nav so we are starting with page=0, rendering the full nav list of all tome-managed pages.
Our initial thinking was that with seg_1 as the body ID we could compare seg_1 with the short_name of each list item to determine if a particular section was the active section and add an id=”current” to that LI, thus giving us the hooks to only show that particular LI using CSS when we are on any pages within that section.
Unfortunately, exp:static_tome_path creates the LIs for us so we can’t add the unique ID to enable that section of the nav as the current section.
If anyone knows a way around this, or if there is a better way to handle local navigation WITHOUT the need to create custom templates for each section of a site, I’m all ears and forever grateful. We’ve been beating our heads on the table with this problem for a week or so now.
Thanx,
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.