Drupal theme preprocess - add classes

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. // Add 'node' back to list of classes because many js based
  2. // admin modules key off of .node instead of AT's preferred .article.
  3. $classes = explode(' ', $vars['classes']);
  4. $classes[] = 'node';
  5. $vars['classes'] = implode(' ', $classes);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.