I've been using the flexible layout for some time because it's so dang fast and easy. Recently, I've wanted something similar but without the heavy DOM footprint (several other people have also shown interest in this: https://drupal.org/node/521740 & https://drupal.org/node/462912). I understand that slimming down the flexible layout would take away from it's flexibility, so I figured I would create my own layout for a similar, but unique purpose (the new layout is in the attached patch).

The goals are that:

  1. the layout would output the least markup possible.
  2. the user would still be able to quickly build conceptual layouts from the layout designer.
  3. the minimal markup generated would facilitate (but not include) styling when rendered on a front-facing page.

I started with the flexible layout as the base and didn't change anything unless I had to. The minimal layout deviates from the flexible layout in the following ways:

  1. Each column, row, and region generates only one element when rendered.
  2. It leaves all front-facing styling entirely up to another theme or module.
  3. It does not restrict columns from containing regions.
  4. The id attribute can be set for columns, rows, and regions.

This kind of layout is really useful when, for example, you are using a grid system in your theme (like 960 or the one in twitter bootstrap) and have classes which already specify the styling for rows and columns. In that case, you can use this layout plugin to quickly build layouts, specifying the classes which match your grid system, and your theme will do all the styling.

Because there have been others who have expressed interest in this kind of thing, I thought it might be appropriate to incorporate it into panels directly. Of course, if that is not ideal for any reason, I can just as easily create a separate module that provides the layout. I definitely appreciate any feedback, I have been using this layout on two sites currently in development and it has been working great for me thus far.

CommentFileSizeAuthor
panels-minimal-layout.patch42.39 KBchasingmaxwell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chasingmaxwell’s picture

Issue summary: View changes

fixed grammatical error.

ChristianAdamski’s picture

The minimal.png is missing. Besides that, I love it.
Could be extended/forked to precisely follow bootstrap CSS expectations.
Maybe instead of waiting for panels to include this, you could put all this in a separate module?

TanvirIsraq’s picture

Priority: Normal » Major

I'm also thinking about that. By reading several blogs, I came to know that Panels author made flexible layout for layout testing purpose, and recommends to use custom coded layout for live project. But I think flexible is also great for live project if it generate less markup tag. Please consider to make flexible layouts more clean and lean. Allow user to define users own markup tag across canvas, column, rows and region.