This site is archived.

The Panels API: Diving Down the Rabbit Hole

sdboyer's picture
Submitted by sdboyer on Thu, 07/10/2008 - 00:20.

Session recording

Session time: 
08/30/2008 - 13:30 - 08/30/2008 - 14:30
Conference booklet summary and bio
Article for conference booklet: 
Drupal Devs! If you want to integrate your modules with Panels2, or take the next step and 'Panelize' your modules as og_panels does for Organic Groups, then this session is a must. We'll be tackling as much sixty minutes allows on the creation of panels plugins (for Panels integration) and implementing the Panels API (for 'Panelizing'). Some quick reference materials will be provided, and we'll begin with a fast overview of how the Panels engine works, but the session will assume that attendees have a solid grasp on the Panels basics, as there won't be time to cover both the basics and the API. Most importantly: bring your ideas! Towards the end of the session, we'll shift over to a rapid-fire Q&A where Sam tries to answer as many questions as possible about how Panels might be able to do what you need it to.
Bios for conference booklet: 
Sam started working with Drupal in late 2007, and joined Earl Miles (merlinofchaos) as co-maintainer of Panels at the beginning of March 2008. He lives in the States in Chicago, IL, where he works two days a week for


Panels2 is a powerful system for organizing and marshaling drupal sites, but the API has a steep learning curve. This session is about breaking the API down into manageable pieces. So, if you've ever wanted to:

  • 'Panelize' your modules, like what og_panels has done,
  • Extend Panels by writing new plugins that add new pane types, new styles, new layouts, new contexts, etc.,
  • Get an authoritative overview of all the ways your modules hook into and take advantage of the Panels API,
  • Toss some of your Panels-implementing ideas out and get feedback on them right on the spot,

then this may be the session for you! We'll divide the 90 minutes into two parts:

In the first half, Sam Boyer (sdboyer) will provide a fast-but-structured overview of how the Panels API works, and where your module can plug in.

In the second half, participants will be free to ask questions about techniques and approaches to implementing the Panels API; Sam (and/or other participants) will respond with comments & suggestions on how to bend Panels to your particular module's need.


  • Provide and quickly run through handouts that overview the Panels API. Lots of space for notes!
  • Quick overview (with visuals) of how the Panels API handles editing and rendering.
  • Overview of the general logic behind the Panels plugin system. We'll also cover panels-specific hooks.
  • Open it up for questions.
  • When we're down to 5 minutes, Sam will stop the action and record any questions that haven't yet been answered; we'll do our best to answer those questions in public & online later on.


Panels is a complicated beast; trying to cover the API in detail would be an exercise in futility. Instead, this session should provide participants with a framework for approach Panels in a productive way. Each half of the session should do that in a different way:

  • The first half will provide a working understanding of Panels' various moving parts, and when and where you can hook in.
  • The second half will provide concrete examples of how people are thinking of implementing Panels, and Sam's answers will suggest how to go about approaching each of those ideas.

Ideally, the combination of the two should provide all participants with a decent grounding in how to 'Panelize' drupal.


The only thing people need to bring is IDEAS! The second half will crash and burn if people don't bring big thoughts on how to implement Panels in new and different ways.

Important Note: this session is primarily geared towards developers writing modules that are or will be kept in the official Drupal CVS repository. If you have client-specific Panels needs that are unlikely to be genericized for use by the whole drupal community, please find another venue to raise those questions.