XF 2.0 Navigation Link

JoyFreak

Well-known member
How do I make it when I add a navigation to the navbar and you click it, it stays selected in the navbar like it is on here when your on 'Forums'.
 
Where is the link pointing it? In most cases, it either needs to be done in PHP code or within the page's template. Though if you're pointing it to a node, you can set the selected navigation section per node.
 
This has caught a few people out, the documention could be clearer because it is not as simple as implied:

Parent navigation entry
If you change the parent navigation entry for an item, it will become a sub-navigation item for the parent you select. Be careful not to move important tools away from their correct parent, or your visitors may find your site confusing to navigate.


As you say it's easy with a page node to just select the parent, but I believe a template needs to have the parent added, e.g.

Code:
<xf:page option="section">forums</xf:page>
 
I have the node selected in navigation however as seen in screenshot, it does not keep it selected but instead it has forums selected. I have attached my settings too.

guide.webpguide1.webp
 
Top Bottom