Dropping Block regions from panels generated page

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
GregoryHeller's picture

Jared, Shawn and I were talking this weekend about panels and themes. The question of eliminating blocks from your theme when using a panel came up. I couldn't find the code for this, but just go it from one of my engineers:

    // Hide sidebars on panel pages
     if (function_exists('panels_is_panels_page') && $vars['panels_page'] = panels_is_panels_page()) {
       $vars['sidebar_left'] = '';
       $vars['sidebar_right'] = '';
       $body_classes[] = 'panels_page';
     }

Comments

thanks

RockSoup's picture

thanks Gregory

-jared

Now in Panels2 alpha

communitysteps@groups.drupal.org's picture

Thanks! I believe Panels2 alpha now has a toggle for this in the advanced settings:

Disable Drupal blocks/regions
Check this to have the panel page disable all regions displayed in the theme.

But it'll come in handy to have the code for the stable version.

Much appreciated!

Seattle

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: