Panel pane region body classes

Public

Add a body class if certain panel pane region exists on the page

Get raw version
php
  1. function themename_preprocess_html(&$variables, $hook) {
  2. if ($panel_page = panels_get_current_page_display()) {
  3. // Add a body class if there's something in the named region.
  4. if (!empty($panel_page->panels['name-of-region'])) {
  5. $variables['classes_array'][] = 'name-of-region';
  6. }
  7. }
  8. }