Dropping Block regions from panels generated page

GregoryHeller's picture
public
group: Seattle
GregoryHeller - Mon, 2007-08-13 16:09

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';
     }

thanks

RockSoup's picture
RockSoup - Mon, 2007-08-13 16:51

thanks Gregory


Now in Panels2 alpha

communitysteps@... - Tue, 2007-08-14 05:56

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!