I installed the module "Node class" (https://drupal.org/project/node_class).

In the README file of "Node class" I read:
"Open your node.tpl.php in your theme and add the following: print node_class($node) ".

After some searching I think the preferred place to do this for AdaptiveTheme would be in the template.php file in the root of the sub-theme so I added this:

 * Preprocess variables for the html template.
function canister_preprocess_html(&$vars) {
  $vars['classes_array'][] = node_class($node);

But the class of the "Node class" module doesn't show. Am I missing something? Can someone give me a push?

Thanks in advance


Jeff Burnz’s picture

Status: Active » Fixed

Like this:

function canister_preprocess_node(&$vars) {
  $vars['classes_array'][] = node_class($vars['node']);

See it uses the preprocess_node function and correctly uses the $vars['node'] variable.

Status: Fixed » Closed (fixed)

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