Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.433 diff -u -p -r1.433 theme.inc --- includes/theme.inc 2 Sep 2008 17:38:55 -0000 1.433 +++ includes/theme.inc 10 Sep 2008 08:34:57 -0000 @@ -1955,6 +1955,19 @@ function template_preprocess_node(&$vari // Flatten the node object's member fields. $variables = array_merge((array)$node, $variables); + + // Gather node classes into one variable. + $node_classes = array('node'); + if ($variables['sticky']) { + $node_classes[] = 'sticky'; + } + if (!$variables['status']) { + $node_classes[] = 'node-unpublished'; + } + if ($variables['teaser']) { + $node_classes[] = 'node-teaser'; + } + $variables['node_classes'] = implode(' ', $node_classes); // Display info only on certain node types. if (theme_get_setting('toggle_node_info_' . $node->type)) { Index: modules/node/node.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.tpl.php,v retrieving revision 1.4 diff -u -p -r1.4 node.tpl.php --- modules/node/node.tpl.php 25 Jan 2008 21:21:44 -0000 1.4 +++ modules/node/node.tpl.php 10 Sep 2008 08:34:58 -0000 @@ -20,6 +20,9 @@ * - $terms: the themed list of taxonomy term links output from theme_links(). * - $submitted: themed submission information output from * theme_node_submitted(). + * - $body_classes: A set of CSS classes for the tag wrapping the node. + * This contains flags indicating various node properties, like + * published status or stickiness. * * Other variables: * - $node: Full node object. Contains data that may not be safe. @@ -48,7 +51,7 @@ * @see template_preprocess_node() */ ?> -