Add a Drupal template suggestion for Panels: page-panel.tpl.php

Drupal has a standard array of template suggestions that let you specify which TPL file should be used according to node type, node id, etc. However, there is no default template suggestion for pages generated by Panels.

You can easily fix that by adding a little snippet to your template.php files' preprocess_page() function.

You can also preprocess the the page for specific Panels layouts: layout; $body_classes[] = 'panel-layout-' . $layout; //add a body class for good measure $body_classes[] = 'page-panel'; } } } ?> And there you have it.

I'm not sure why you'd need this, since you can already write your own Panels plugins for your custom theme.
Just add plugins[panels][layouts] = to your
Then, when panels is running, it will look for display layouts in there.

Nice to find some decent content for once, I am getting tired of the continual drivel I find on a daily basis, respect.

I'm getting a white screen error:
Cannot redeclare xxx_preprocess_page() ()... in
all/themes/NaiveArtOnlineColorful/drupal7_theme_methods.php on line 59

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.