Panels magic
I love unexpected discoveries.
Drupal's Panels module seems to find its way into most of my site builds, along with custom layouts, panel-panes and all sorts of goodness.
I used to declare custom panel layouts this way:
<?php /** * Implementation of hook_panels_layouts(). */ function modulename_layoutname_panels_layouts() { $items['layoutname'] = array( 'title' => t('NAME OF LAYOUT'), 'icon' => 'layoutname.png', 'theme' => 'panel_modulename_layoutname', 'css' => 'layoutname.css', 'panels' => array( // 'regions' used in the layout 'topleft' => t('Top Left pane'), 'topmiddle' => t('Top Middle pane'), 'topright' => t('Top Right pane'), 'bottomleft' => t('Bottom Left pane'), 'bottomright' => t('Bottom Right pane'), ), ); return $items; }
<?php /** * Implementation of hook_panels_layouts(). */ $plugin = array( 'title' => t('NAME OF LAYOUT'), 'icon' => 'layoutname.png', 'theme' => 'panel_modulename_layoutname', 'css' => 'layoutname.css', 'panels' => array( // 'regions' used in the layout 'topleft' => t('Top Left pane'), 'topmiddle' => t('Top Middle pane'), 'topright' => t('Top Right pane'), 'bottomleft' => t('Bottom Left pane'), 'bottomright' => t('Bottom Right pane'), ), );


Comments
#harrison22[DGD... (not verified)
Mon, 06/06/2011 - 14:19
Permalink
Hey - I am really glad to find this. Good job!
prokCarkfax (not verified)
Sat, 09/03/2011 - 19:50
Permalink
Just making my first post at deglos.com, which seems to be a wonderful forum!
Add new comment