Panel pane body classes

Public

Add a body class if certain panel pane 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 body classes if certain panels are present.
  4. if (strpos($variables['page']['#children'], 'pane-bundle-name-of-pane')) {
  5. $variables['classes_array'][] = 'name-of-pane';
  6. }
  7. }
  8. }