Good day.
I can't understand some questions. Please help me.
I'm using 7-x -3.1 version.
I'm created subtheme based on the at_subtheme.
I'm renamed It to ecomotors.
In my template.php I'm putting this code:

function ecomotors_preprocess_html(&$variables) {
  $roles_array = $variables['user']->roles;
  if (in_array("administrator", $roles_array)) {
    $variables['classes_array'][] = 'is-admin';
  else {
    $variables['classes_array'][] = 'not-admin';

But they are not applied in my body class in page.
My function ecomotors_breadcrumb works greate, but function ecomotors_preprocess_html dont applied on the page.


Jeff Burnz’s picture

That should work, did you clear the cache?

Just remember body classes are not in the "page" in Drupal, they are in the html.tpl.php template, strictly speaking "page" classes are in the page.tpl.php template and uses the themeName_preprocess_page() function (unlike most themes AT actually makes use of the page template level classes array).

I assume when you say "body classes" you mean classes applied to the "body" element, in which case what you have above is correct.

Jeff Burnz’s picture

Issue summary:View changes
Status:Active» Fixed

Assuming fixed.

Status:Fixed» Closed (fixed)

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