Hi everyone,
I’ve been working on finishing development of a Video page for a clients site. For this I have 1 video template group and 3 templates within that. Two of the templates need to have an active state css property applied to my category permalinks so you know what category you are in at all times. The Video page currently uses 1 video channel which has 3 categories.
Btw here’s what I’m using:
EE Version 2.1.3 Build 20101220
PHP Version 5.3.6
As of now I got the active state working for one of the templates using a conditional based on the url segment.
URL: http://example.com/index.php/video/page/category/community
Code for that: See my attached file since apparently the forum removes the conditional and permalink when you post using the code tags.
class=“currentChannel” highlights the current channel link in green with css.
My next template where I need to get this working has a url that looks like this..
URL: http://example.com/index.php/video/view/dancing
So I’m not really sure how to get this one to work because the entry in this case “dancing” will always be changing so a conditional won’t work. And if I set this conditional to apply the active state for the view template, then all my categories will be highlighted in green.
I’m sure someone has ran into something like this before. I tried searching and couldn’t find an answer. Let me know what you guys think.