Posted by danilenko.dn on July 29, 2011 at 4:47pm
4 followers
Jump to:
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 ;)
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
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