Use PHP to place panels anywhere in your Drupal site

Panels are a quick and easy way to create columns of information.  You can easily add blocks, nodes, and views to a panel layout.  One great thing about panels, is that you can easily administrate the panel from your Drupal admin pages.  Here's how you can embed a panel into your theme or simply place it in a block or region: 

Use panels_panels_page($did)

For example:

<?php
$did = 1;
print panels_panels_page($did);
?>

where $did is the database id of the panel. $did = 1 is the first panel.

You could stick that PHP code in your theme or you could put that in block and then place the block in the header, content, and/or footer of your sites.  The possibilities are endless.

Tags: , ,

Syndicate content