Hello all,
I have a bit of a challenging (or not) question. Here's the scenario:
First, the site is using Panels completely with a custom theme (header/footer in theme, panels does the rest).
Ok so on the homepage there is slideshow in the top part which is powered by a NodeQueue View (using fields, not nodes display type) and Views Slideshow (arbitrary, may end going with custom JS/theming).
Each node in the NQ has an associated taxonomy, let's call it category. What I'd like to do is take the category from the first node in the NQ, and inject it as a variable into my template - specifically as a css class in the body tag.
My template is already set up to use the $body_classes variable and is working in a few other implementations. I've been researching and tinkering around but I can't figure out what manner of _preprocess function (or any other function) to use to achieve this, or where I would put such a function.
Any suggestions?
Also, sorry if this is filed under the wrong module. I was debating whether it should go to NQ, Panels, or CTools even, but I think the solution lies somewhere in Views.
Thanks!
-M.
Comments
Comment #1
dawehnerSo you have to write something like this in your hook_preprocess_page