Sempervivum Not shure, if I understand this correctly: You have the same nav on each page and you want to set the class "active" for that entry that corresponds to the page currently loaded?
Well, yes and no. I am using Go and templates. Go acts both as web-server (replacing Apache) and "micro framework" sort of. This means that there is only ONE sidenav, but reused on many pages. A dummy site is here:
http://94.237.25.207:7070/fonts
As I interpret it, the sidenav (sub_about) is reloaded to its initial status each time. Which means that the click on the sidenav button will be overwritten.
<div class="container">
<div class="submenu">
{{template "sub_about"}} <----- <div id="nav"> as above
</div>
<div class="content">
Content stuff...
</div>
</div>
So, my guess I have to reset the "selected" button att page load. Correct me if I am wrong.