Forum Discussion
Kev_B
9 years agoAdvisor
Just to add to my navigation problems:
I've tried targeting the ${page.name} to set class=active, but unfortunately my existing blog page and the newly created blog both share the page.name of BlogPage, I've looked through the FreeMarker Context Objects and can't find anything else to utilise in order to set the class active to the current page only.
Does anybody have any suggestions for a workaround? I'm considering writing some JavaScript to set the active classes on nav link, but read somewhere that JavaScript shouldn't be used in the head of the page, which is where our navigation is contained. Does anybody have any pointers on this?
Related Content
- 2 months ago
- 5 years ago
- 9 months ago
- 2 years ago