Panels2: Worth the Upgrade and Steep Learning Curve



June 05, 2008

If you've used the panels module than panels2 is a logical upgrade. It lets you create a content pages which are divided into multiple areas which can include many kinds of content (e.g., nodes, blocks, views...)

Here's what's new in Panels2:
It offers many new features, better interface and the ability to enter edit mode right from regular node view (the original Panels requires a half dozen clicks to access edit mode) You can create a flexible layout either to by percentage or pixels rather than being forced to work with a pre-determined layout template (i.e. 2 columns and 2 rows)

You can choose to Disable Drupal blocks/regions (ie. right side, left side, header, etc...) This is great is you are tired of using block configuration to determine which node shows which block appears on which page. You no longer have to re-configure each block everytime a new node is created. Just choose the option to hide the blocks and choose your own layout.

You can add a block, view (page, block or embedded), contributed item (i.e. logged in users) or create your own block content on the fly. It is easy to move blocks around the layout, or add a previously created block. Panels2 offers the ability to determine what block appears where on a page based on the layout you've chosen.

Panels can be context specific, so you can use it to take over all user pages (i.e user/%)

You can customize the title of a panel block, it even accepts html code in the title

You can set access for the panels or each block/pane so that you can determine which roles see the node or even have specific items show based on role (ie. login block if you are not logged in)

The downside to Panels2: There are a lot of options to choose from, making the learning curve steep. The terminology is a little difficult to grasp. The whole thing is called a panels and the 'blocks' inside are called 'panes' (but i prefer to call them blocks)

If you write bad code in one block, it wrecks the whole panels. For example if you don't close a tag in one block, it ruins the rest and then the whole panel layout becomes unmanageable. Also watch out for specifying the width of a table, since this messes with the layout too. In this case you can export the panels and re-import (make sure you pick a new panel name at the time of import, and fix your bad code, of course)

Although still in the beta stage, it's production site ready despite a few quirks. It is a powerful module that gives you full control over each page without having to play around with blocks. Download panels2 here:

panels2 documentation:

Here are some examples of panels2 in action:

About The Author

Mike Gifford is the founder of OpenConcept Consulting Inc, which he started in 1999. Since then, he has been particularly active in developing and extending open source content management systems to allow people to get closer to their content. Before starting OpenConcept, Mike had worked for a number of national NGOs including Oxfam Canada and Friends of the Earth.