How can I specify a $section_class for all taxonomy pages of a specific vocabulary?
I know how it's possible to specify this:
* page-taxonomy-term-1.tpl.php (where 1 is the term id).
* Tip: Use page-taxonomy-term.tpl.php to style all taxonomy term pages.
My problem is that I want to customize all taxonomy pages... but not from all vocabularies... just for some of them... so I can't use page-taxonomy-term.tpl.php to style all taxonomy term pages
thanks
Comments
Comment #1
Jeff Burnz commentedHere is the way to have template suggestions per vocab:
http://adaptivethemes.com/page-template-suggestions-for-taxonomy-vocabs
This will allow you to use a different template for each vocab, so all the terms in vocab 1 will use something like page-vocab-1.tpl.php etc.
An easy way to get the vocab in the section class is to put the vocab in the URL using Pathauto, so the vocab name is the first part of the URL for taxonomy term pages.
Comment #2
hedac commentedThank you for your reply
I'll update that code to my particular needs because I'm not using taxonomy/term/ paths for my taxonomy pages... Using the "Taxonomy redirect" module so I can have different paths for taxonomy pages that can be used in "Views" to have also a different View for each vocabulary..
Seems a bit complex.. different views, and different theme templates for each vocabulary.... But that's what I need, and Thanks drupal is so wonderful and flexible :)
Thank you
Comment #3
hedac commentedok it was easy now
I'm using for example
taxonomy/vocab1/term/tid
taxonomy/vocab2/term/tid
taxonomy/vocab3/term/tid
so I only need this:
Comment #4
Jeff Burnz commentedThe arg is taken from Drupals *internal path* - it has nothing to do with the alias, you can rename the paths what ever you want.
Comment #5
hedac commentedyes.. "Taxonomy redirect" works on internal paths , not alias paths
Views arguments work with internal paths too, that's why I needed taxonomy redirect
Comment #6
Jeff Burnz commentedOK, great, glad its working for you, I think we can call this fixed now.