Hello,

please,
anyone can help me for add a body class based on vocabulary id ?

by advance, Thx

Comments

jeremycaldwell’s picture

Status: Active » Fixed

The body class for taxonomies should already be added and available.

Example: page-taxonomy-term-28

The term ID is 28 for that particular taxonomy term so that is what you would use to style that particular taxonomy term.

plsk’s picture

eternalistic , thanks for your reply.

But i'm need to add body class based on vocabulary id, it's possible ?

by advance, Thx

jeremycaldwell’s picture

Status: Fixed » Postponed (maintainer needs more info)

That's what I was trying to explain, sorry. The taxonomy, or vocabulary, id is available in the body class.

This body class appears when you are viewing a taxonomy term listing page. Such as when you add a term to a node, then click that node as it links to the taxonomy term listing page for that term. So this body class appears on that listing page but not on the page for the node that contains the taxonomy term.

petrovnn’s picture

Status: Postponed (maintainer needs more info) » Fixed

eternalistic, i am sorry, but you're wrong :)

Vocabulary ID
and
Term ID is different!

we need a class like: page-taxonomy-vocab-2

I know that it's not in the core now, but am looking for a universal solution

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.