You are here

8 December 2011

Adding body classes in Drupal 7. Just a little code snippet that can be useful in some cases.

Source code viewer
  1. /**
  2.  * Implements hook_preprocess_html().
  3.  */
  4. function HOOK_preprocess_html(&$variables) {
  5. $variables['classes_array'][] = 'my-class';
  6. }
Programming Language: PHP