Add html class to body I've got a block created with views, which displaying a slider.
The slider is created as an unpublished content type with two field collections:

Settings[one value]:


selectors type: thumbs or bullets
slider class: fixed position, faded etc.



Slider content[multiple values]:


slide class
content class
Image
content


I do not use views slideshow module
I'm using views-view--slider-block.tpl.php file to customize the output

All works, but I have stuck with one specific setting "fixed position" - this setting should add to html a special class, which I guess can be added only by preprocess_html function:

function MYTHEME_preprocess_html(&amp;$variables) { 
    if ( SLIDER HAS "fixed" SETTING ){
        $variables['classes_array'][] = 'slider_fixed';
    }
}


the problem is:


how to compose the if statement?
Did I have to load $view object which allows me to check what
setting is used?


I'm looking for the solution which has the lowest influence on the performance.

any suggestions?
The Context API allow to pass a variable from view.tpl to template.php file

Example:

In view.tpl file :

context_set('slider_settings', 'slider_class', 'fixed_position');

In theme template file :

function MYTHEME_preprocess_html(&amp;$variables) { 

$slider_class = context_get('slider_settings', 'slider_class');
if ($slider_class == 'fixed_position'){
    $variables['classes_array'][] = 'slider_fixed';
}


}

It is an aswer for my own question, because I found a solution by myself, and it might be useful for someone I think..