Hi guys,
Purchased and installed EE today (hooray for me), initially for my own site. It’s really starting to take shape, and I’ve already managed to define my homepage template and have it pull entries from several channels through embedded templates. I’ve just finished building a “somewhat dynamic navigation” by having Query loop through all template-groups, and all was well with the world 😉. Now I’m running into something of an issue which I don’t quite know how to fix. Basically I want to add class=“active” to the active template-group. I’m pretty much stumped. My nav subtemplate looks like this:
<div class="grid_12" id="nav">
<div id="nav-left"></div>
<ul id="primary">
{exp:query sql="SELECT group_name,group_order FROM exp_template_groups ORDER BY group_order ASC" }
<li><a href="http://www.digitaaldier.nl/{group_name}">{group_name}</a></li>
{/exp:query}
<li><a href="#contact" class="anchorLink">Contact</a></li>
</ul>
<div id="nav-right"></div>
</div>
<div class="cl"></div>Any thoughts on how I would achieve adding class=“active” to the a-element of the active template group?