I've got a content type (Brands) and a taxonomy vocab (Product Type) with a few options, so you can "tag" a brand with a specific product type. Using Views I'm filtering my content on my pages depending on the taxonomy term.
I've got a Views block (I'm also using this block as a dropdown in my navigation with the Menu Views module) that lists all the brands tagged with a specific taxonomy term. What I want now is that this block also shows up in my right sidebar on all the pages that display content of 'Brands' and are tagged with a specific term from my taxonomy vocab.
Example (menu structure):
* Product Type A - Brand 1 - Brand 2 - Brand 3 * Product Type B - Brand 2 - Brand 4 - Brand 5
If I'm on the 'Brand 1'-page, the 'Brands' list under Product Type A should show up in my right sidebar.
I can't filter using the 'normal' way since its the same content type, and the same taxonony vocab. And by the 'normal' way I mean using a URL pattern for the content type and then use
contenttype/* on my block config page.
Sidenote: I'm also adding a class to my
hook_preprocess_html() for all the brand pages. So all the brands tagged with Product Type A have a class of
product-type-a on their
<body> field. Is there a way so show/hide blocks depending on a class through code?