Hello All,
I've spent hours trying to figure this out. Could someone point me in the right direction?
What I'm trying to create is a single user blog through views. I created it fine.
I also created a view that outputs specific Taxonomy terms that are the Categories of each of the blog entries.
All that works great.
The problem is I can't figure out how to keep the tab title Blog I have in the Horizontal Primary menu highlighted when clicking on this list of Categories for the blog. Same issue when I click on one of the Blog entries.
Is there a way to tell Drupal to give a primary menu item a class of active when it is not a child of that menu item?
I'm willing to try anything: place some code in template.php, or maybe target it through specific url, whatever works. I am totally lost on this one. I'm a new Drupal user also.
Thanks in advance for any help offered,
- Sean
Comments
I'd create your own primary
I'd create your own primary navigation in the page template with php. Check the url, and depending on the section you are in (e.g. '/animals/dogs/page_1'), tag the body with that class (e.g. 'dogs' or whatever), and style it with css.
A method like this is described in the sixth IBM Drupal tutorial (Listing 6. Using a vocabulary to set body element class attribute value in page.tpl.php).
I hope this helps.