How to style Teasers differently in different displays and pages?

I am struggling very much with Drupal's CSS classes for teasers....Is there anyway to add them separate class name for each case?

Now, if I'm styling Teasers on Taxonomy page - the same class applies to Teasers on Front Page Promoted teasers, in Teaser blocks in Views, etc....

Well, I removed "promoted" teasers and put them in Views block and assigned a class; and it's separate on Taxonomy page....

BUT - what would I do if I would wish to have a separate template on some other (taxonomy) page for...teasers?

All those Teasers are in one big pot, named .node-teaser and the same field names...

//Using D7 and Zen 7.x.5x.

1 Answer 1


You can create different Entity View modes instead of the single teaser. While you can do that via a custom module in Drupal 7, there is a nice little module for that (https://www.drupal.org/project/entity_view_mode) too.

Create different modes like 'teaser_front', 'teaser_sidebar' and theme them differently using the standard theming convention (can also be found in the module page).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.