Hi. im trying to use view-mode slected to create some classes in body, but the code dont work and may be display suite is in game. So let me explain the problem

if do something like:

function mytheme_preprocess_html(&$variables) {
    if ($variables['view_mode'] != 'teaser' ) {


       $variables['classes_array'][]="nodeg-" . $variables['view_mode'];

  }
}

The nodeg- create a new class.

But if I try to use a view mode create in display suite like:

function mytheme_preprocess_html(&$variables) {
    if ($variables['view_mode'] == 'viewmode_displaysuite' ) {


       $variables['classes_array'][]="nodeg-" . $variables['view_mode'];

  }
}

Nothing happen. Like if there is no view mode selected. Only occurs with view mode create with display suite.

Any idea about it?

Comments

koffer created an issue.