Panel page layout body class

Public

Add a body class for the name of the panel pane currently rendered

Get raw version
php
  1. function themename_preprocess_html(&$variables, $hook) {
  2. if ($panel_page = panels_get_current_page_display()) {
  3. // Set body class for the name of the panel page layout.
  4. $variables['classes_array'][] = 'panel-layout-' . str_replace('_', '-', $panel_page->layout);
  5. }
  6. }