19

I've never thought much of Panels, as I have always been comfortable with writing my own themes.

However, I have seen a lot of articles advocating the virtues of Panels (from Lullabot & Active Lamp), so I thought it would be time to revisit it, especially as Panels is going to be in Drupal 8.

I've played around with it extensively and I've even watched this helpful screen cast series. But I can't see what the benefits are.

I usually build websites where non-technical people can edit the nodes. Usually each node form will have several fields where the user can add all the content for that page.

To get the most out of Panels, it seems you have to split your pages into separate nodes that hold 1 piece of content and then use the Panels to bring the separate nodes together. This might be fine if you are creating a site that is only to be edited by a web designer.

However, it creates an issue when you give the site to a non technical person to add content. Most non-technical people would like to do all their page creation on a single screen. If they have to create lots of different nodes and then let Panels bring them altogether, it seems to be confusing for them.

I know Panels has better performance and better support for context compared to Blocks. However, it seems to add a lot of complexity and abstraction.

I can see how it would be incredibly useful for a non-themer, but I can't see what the benefits are for someone who can theme.

Could someone enlighten me. Thanks!

10

One large advantage of Panels is that you can have wildly different layouts for pages, depending on your needs. In this context, layouts can mean both content and styling.

On the content end, you can have your main node-being-viewed piece, and add in different things. For example, you can add in views into sidebar areas that show/link to related content. You can also add in blocks, and have a lot more flexibility than what come stock with Drupal (though D7 really improves things).

On the styling end, the biggest advantage is being able to choose different layout templates for each page and variant. Other modules, like Context can do similar things, but I find it much easier to do with Panels.

With the sites we build, all pages are Panel pages (no exceptions). From the client's perspective, having adequate training and inline help greatly helps with them being able to keep the site alive (and nearly all of our clients are non-technical).

A side effect of using Panels is that you get a lot of features that cTools provides, which can be a huge benefit when you need to retrofit a site. In a lot of ways, we have found using Panels pages for everything really aids with future proofing a site.

  • Hi! Thanks for taking the time to reply. I really appreciate it. I just have a few questions. 1) What's the advantage of using Panels to display side bars of Views etc, compared to regular blocks. 2) When you say retrofit a site, what do you mean? I know I must sound like some luddite clinging to my old ways, but that's not the case. I really do want to adopt the new, but I am just a bit confused about those two points. Thanks! – big_smile Aug 20 '12 at 6:52
  • 1. I feel than you get finer grain control over ordering, have better visibility control w/ selection rules, and ctools allos better methods for getting view parameters into views using panels that blocks alone. 2. Recently, I added a mobile version (not mobile CSS) to a site. With panels, I just had to split each page into mobile/desktop variants and used selection rules to choose each. – mpdonadio Aug 20 '12 at 10:48
  • Thanks for all your help! So can panels be used to make custom mobile layouts? When you say "not mobile CSS", do you mean it is not responsive? Do you have any links that explore Panels & mobile layouts? – big_smile Aug 20 '12 at 17:43
  • In this case, the content and layout were different for desktop and mobile for several reasons. Panels let me choose different layout templates for each (eg, multi column for desktop and single column for mobile). It also let me have different content (eg, use view 1 for desktop and view 2 for mobile). – mpdonadio Aug 20 '12 at 18:18
0

One way to use panels is the way you describe: create a node with panels and put in content from other nodes. Yes, that is a bit unwieldy.

Better: You can also add fields to a node content type, panelize it, and place the fields into the panel layout. In this case, you might add col1 and col2 text fields, and users could enter their content into body, col1 and col2, which would display automatically into the panel you have set for that node.

Suggestion: Use the Panelize Module, rather than using Node panel, which is deprecated. The panels docs are unclear on which panel method you want to use. Panelize let's you add a panel to any node for any content type. Then you get layout plus all the other panels benefits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.