We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Problems creating auto-generating local (parent category, current page, and all siblings) navigation using Tome module

Development and Programming

openmotive's avatar
openmotive
65 posts
17 years ago
openmotive's avatar openmotive

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,

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.