How to add Views name to body class? At moment Drupal add css class page-VIEWPATH to the body tag. How can I add css class page-VIEWNAME to the body tag without third party module or JQuery?

Thank you in advance!
It turns out, this can be done with a combination of hook_preprocess_html  and function views_get_page_view to get a true &lt;body&gt; class for a given view and display (see the API page). 

So wrapping it up within the hook_preprocess_html context, it would look something like this:

/**
 * Implements template_preprocess_html().
 *
 * Misc page preprocess functions.
 */
function mytheme_preprocess_html(&amp;$vars) {

// Query the view and add a class
$view = views_get_page_view();
 if (
  isset($view) &amp;&amp;
  $view-&gt;name == 'actions' &amp;&amp;
  $view-&gt;current_display == "page"
) {
    $vars['classes_array'][] = 'views-actions-page';
  }
}


So above, I query the view name and display and the key is $view = views_get_page_view();. This works great for custom Views body classes per view and display. 

The rendered HTML result is something like this:

&lt;body class="html not-front logged-in no-sidebars 
page-actions section-actions page-views flush-header views-actions-page"&gt;


** views-actions-page is the class that we added with the function above.

It should be noted that the advantage of this vs. using views generated classes are that if the URL of the page changes, your custom Views class will not whereas page-actions section-actions would change based on the URL. So using those classes could be unreliable if they are used for theming as it would have a negative ripple effect.