Panels with views, blocks vs panes

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
davidarthur's picture

On a site with panels and views you have the option to create a display as a block or a pane.
What are the pros and cons? As far as I can see a block is more flexible than a pane and more universal, what was the reason for creating a pane display?

Kind Regards,
David

Comments

Contextual data, argument passing, etc…

jason.bell's picture

If I'm using a Panels based layout system for a site, then I typically build Views displays with Content Panes instead of Blocks for many reasons, but these are the top 3 for me:

  • Argument handling (I don't have to write a bunch of PHP into the Block to pass arguments)
  • Path inheritance (the pane can override all Views generated links to use the custom path of my Panel)
  • Settings (A content pane has UI settings to override title, number of items shown, exposed filters as settings, etc…)

If you look again, you may find tat Content Pane is more flexible than a Block in the long run. I guess the caveat being that if you're still using the Block system for layouts on the site it becomes confusing. If you've given up the Block system for using Panels Everywhere, the Content Pane display in Views is the way to go.

Hope it helps with the distinction,
Jason

Thanks for that Jason, I'll

davidarthur's picture

Thanks for that Jason, I'll have another look into it. Do you know if these features are documented somewhere?

Panels 3 Documentation:

jason.bell's picture

Panels 3 Documentation: http://drupal.org/node/496278

I'm not sure if it covers everything yet.

I see it just the opposite

windtrader's picture

David,

I find using panels, panes, mini-panes, and especially node templates much more flexible, adaptable, and useful than simple blocks and regions. A dramatic example is having a template with one region. You can assign various blocks to that region but have little control over the defined layout, format, and theming without overriding the theme. You can alter the placement and display of the blocks but this requires digging into the template.

Contrast that with using a single panel with a number of panes, all defined and updateable directly through the Panels/panes interface. You can specify CSS class and ID at every item in the panel and it's much faster and easier to do it this way.

Don't get me wrong, I'm sold

davidarthur's picture

Don't get me wrong, I'm sold on panels, we use them extensively on our site http://www.bigtattooplanet.com/. I just didn't see the reason behind panes in views. I'm going to research them a lot more. Like a lot of things in Drupal, the power is there it's just not obvious straight away :)

The primary reasons for

merlinofchaos's picture

The primary reasons for content pane are:

1) If you're fully bought into Panels, it's the only type of display you ever need.
2) You can fully control how it appears in the Panels UI.
3) You can control how much of the View is configured via the pane and how much is configured via the View. This is important when your content administrators have access to the Panels.
4) Content panes are the only view that can accept Context. This is required if you want to do something like accept a taxonomy term argument, use a relationship, and then pass that data to both a view and some other content in a panel.

IMO, most sites are best off by visiting the panels configuration and unchecking the box that just makes all views available to Panels. Content Panes provide more universal control and categorization.

However, this is not necessarily convenient to everybody's workflow, so both methods are fully possible.

How do I use Read more links I created for my panel pane

jlab's picture

I started using Panels/Pages/Views content panes for my OG Displays... And it is apparently awesome for contextual data and argument passing... I can display group content and group members and display view_pane content etc.

But how the heck do I get my Read more options for my Content Pane working...

I see settings in the Views for a Content Pane called "Use Panel path" which I can see changes the url of the more link it changes to the panel url with a id appended after the nid. When clicking that multiple times it just starts appending more id's and you end up with a url like "http://example-site.com/node/101/1/1/1/1/1"

How do I specify which other Content Pane Display to use for the more link?

Coming from Spaces, Context and OG panels sometimes feel like a nightmare to configure...

Is there better or more complete documentation about Panels/Pages somewhere? So i can educate myself on the proper use of Panels?

Screencast series

Itangalo's picture

Here's a pretty good introduction on Page manager and Panels (if I may say so myself): http://nodeone.se/blogg/learn-page-manager-screencast-series-summed-up

Have fun!
//Johan Falk

Thank you

jlab's picture

I stumbled upon "Learn Page Manager" series yesterday I have watched the whole series just after posting my previous post. Great videos by the way, I learned a few new things and it answered quite a few questions I had in my head.

But I still can't figure out how to get my Views "panel panes" "More links" to work...

I will try again with the new knowledge I acquired yesterday and see if I make better progress today.

Maybe I'm just approaching the problem from a wrong angle...

Your settings are correct, I

exiled_hammer's picture

Your settings are correct, I have two sites using the same.

There was a Views/Panels/CTools bug that was fixed a while back. Do you have the most up to date versions?

Unrelated are you using the Context module as well as Panels? If so would be interested to know why as Panels has it's own system.

Hi there these are my module versions

jlab's picture

Chaos tools 7.x-1.0-rc1
Views 7.x-3.0-rc1
Panels 7.x-3.0-alpha3

We are using the context module as well... We are using a sub-theme created from omega and use the delta module for creating different layouts and switch the layout and blocks for the site using the context module.

I am using Panels for the Groups Section of the site... It seems that OG has been more tightly integrated with Panels... I assume this has something to do with the fact that you can pass multiple arguments to a panel with view panes and the fact that the Panel Layout for the group is independent from the theme. (Someone please correct me if my understanding is not correct here, Or please share some more in depth knowledge about this if you feel like it)

That explains it I am still

exiled_hammer's picture

That explains it I am still running D6, as they are live sites and there isn't the budget to do the testing on alpha releases :(

We are using the context module as well... We are using a sub-theme created from omega and use the delta module for creating different layouts and switch the layout and blocks for the site using the context module.

Maybe it's me but isn't this is a case of installing two modules to do the same thing? These days I tend to install Panels & Panels Everywhere with blocks disabled, custom panes can be added whilst on a page using the In Place Editor.

The Explanation

jlab's picture

Maybe it's me but isn't this is a case of installing two modules to do the same thing? These days I tend to install Panels & Panels Everywhere with blocks disabled, custom panes can be added whilst on a page using the In Place Editor.

I don't have that much experience with mobile first and adaptive theming with Panels I just find it easier to use something like Omega, Delta and Context to build the site to scale on a wider variety of devices. I'm also very used to grid theming using a 960gs Grid System. (http://960.gs/) This is baked into the Omega Theme.

This is very important for the current site we are building. I'm already a bit baffled on how I'm going to display the groups on mobile devices and tablets etc. The users of the site will be mainly located in Africa where mobile devices is preferred over Desktop PC's and laptops because of the affordability and issues with electricity. Also some places has no Internet infrastructure except through mobile phones because of many issues like cable theft or remote areas etc.

I'm just starting my whole journey with panels and pages and as soon as I can get used to the paradigm shit to Panels I would probably find solutions to all the issues I have to deal with at the moment as I start to put my thoughts around it.

So in short it all boils down to that I'm used to using Omega, Delta and Context and have very little experience with Panels/Pages.

Possible Patch Fix

jlab's picture

Ok I found this thread:

http://drupal.org/node/564106

Which seems will solve this issue for me.

It allows you to add a custom url for your more link. This way I can create a panel with a url and add my Views Pane to the new panel.

I ended up using a footer of my view for the more link to test this but adding this functionality to Views would probably be a better idea.

I'm just figuring out how I can keep the context of the group for this View since I'm not using Page Manager but creating a new panel with a url...

I could probably get the context by adding the Group ID to the URL.

But that is probably another issue...

I don't want to hijack this thread or go too much off topic so if you are interested if this eventualy worked for me please just ask and I will let you know.

Views Developers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: