Download & Extend

node-full class in full node

Project:Omega
Version:7.x-3.0-rc2
Component:Feature Request
Category:feature request
Priority:minor
Assigned:danilenko.dn
Status:needs work
Issue tags:full, node, node-full, omega

Issue Summary

Hi! I can't find a class for a full node... Or i have to create new *.tpl.php?
It is very hard to theming without it. Add please ;)

Comments

#1

Priority:critical» minor

why don't you use the node-teaser class (that is there) to style for default (.node) first, then overwrite anything that has the .node-teaser class?

otherwise, I suppose this could be added easy enough, it is however, definitely NOT critical.

#2

thanks!

#3

If anyone else has this need and overriding the default is impractical, you can add a class that reflects the view mode with preprocessing:

function MYTHEME_alpha_preprocess_node(&$variables) {
    if ($variables['view_mode'] != 'teaser') {
      $variables['attributes_array']['class'][] = 'node-' . $variables['view_mode'];
  }
}

This will produce node-full, etc. I added the if statement to prevent it from happening on the teaser, because the core node module already provides a node-teaser class by default, and I didn't want to output two.

#4

not only node-full, but promoted, sticky classes would be more helpful