Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Introducing the Pane Module

Parent Feed: 

There are a couple of scenarios we see on pretty much any Drupal-powered website we work on. The first and foremost among those is often that our client wants to, you know, actually be able to easily manage their content. At the same time we need to be able to fit their content into the information architecture and design of the site. When we're talking about entities, nodes, and taxonomy terms it is pretty easy for content managers to go in and edit content. But what about little blocks of text on the home page, in the footer – or featured call-outs on various pages? These kinds of features have been a constant struggle to ensure that they exist through the process, but allow the content itself to change as needed.

Front-end example of the Pane Module at work.

Over the years we've tried many different Drupal modules and solutions including, Core blocks, Boxes, Beans, and Fieldable Panels Panes, but none of them quite worked right for both us and our clients. So we wrote our own module called Pane. The key features that we needed from our new module were:

  • Exportability – allow it to be exported through CTools and Features; neither Core blocks, Beans or Fieldable Panels Panes are easily exported
  • Separation of configuration from content – allow the guarantee of existence and format but allow the content to vary; when Boxes are exported they export the content along with configuration
  • Integration with CTools/Panels – we're heavily invested into the CTools universe and needed our tool to work nicely with those; most of the modules above stem from the block system and don't play nicely with CTools
  • Internationalization – allow the content to vary based on the current language; Beans and Fieldable Panels Panes are entities and could presumably be translated, but there's a layer of complexity involved in that which makes it more challenging

What the Pane module allows a developer to do is create a Pane and embed it on either a CTools Page Manager page as a CTools Content Type or through the normal Block interface. From there the Pane can be edited through the normal Panels or Block interface to edit HTML through a WYSIWYG or if using the Pane Entity Reference plugin to add and order references to various entity types much like the Entity Reference module. Those referenced entities can be output using either a display mode or a View. 

Once the module is installed and the permissions configured, an admin can go to Administer -> Structure -> Panes and see a list of current Panes and add new ones.

They can also edit Panes through the normal Panels interface or through the In Place Editor.

And then exporting can be done through the normal Features interface. The configuration and the data can be exported separately and generally only the container is exported. But if you know that the content isn't going to change and needs to be locked down in Features it can be there as well.

This module makes a lot of sense both for developers and content administrators. Let us know what you think in the comments.

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web