Printing current node workflow state name as the page body classes I have a workflow system in my site using workflow module, and I need to print the node current state name as body class.

I did the same with user current role in template.php with this snippet:

function sattari_preprocess_html(&amp;$vars) {
  foreach($vars['user']-&gt;roles as $role){
    $vars['classes_array'][] = 'role-' . drupal_html_class($role);
  }
}


I'd really appreciate your help.
I think once you get the node object in your preprocess function then you will be able to add the class. Body classes are only applied in template_preprocess_html so you can do the following,

function sattari_preprocess_html(&amp;$vars) {
  // If on an individual node page, add the node type to body classes.
  if ($node = menu_get_object()) {
    // debug($node);
    // Change as per your node object values added by workflow module.
    $variables['classes_array'][] = drupal_html_class('node-status-' . $node-&gt;status);
  }
}


For more reference have a look at template_preprocess_html