Displaying multiple contextual views as tabs within panels

flapsjack's picture

I am using D7 and Panels 3 and the node template panels page. Here is what I would like to achieve:

Single panel layout invoked when viewing certain type of node
Common left side elements
Tabbed main content section made up of multiple views
Each view accepts contextual argument from panels node template

I have this working for a single view, but can not figure out how to get it to work for multiple views. I have tried using quicktabs, a combination of eva and field_group using a horizontal tab style, and multiple panel variants using a url path selection rule. None of these have worked properly.

To try and make it easier to understand, I basically want multiple views that are accessible via a tabbed interface and that share the contextual argument provided by panels based on the node that is being viewed. This doesn't seem like it should be this difficult to achieve.

This setup will allow me to have a common display for the node being viewed and the only dynamic part being the views within the main content area of the panel. I could always create multiple panel pages that each have a single view, but then I have to make layout changes to multiple panel pages every time.

Does anyone have any suggestions? Also, feel free to ask for additional information if I need to be more clear.

Thanks

Comments

Use the Tabs page element in your panel page?

c4jwant's picture

Hi,

Here's an idea to try.

Create view page displays with unique paths that use the NID such as /node/NID/view-1, /node/NID/view-2, etc. Configuring these views to use menu tabs.

Create panel page variants on path, and then include the tabs page element in your panel.

Or, create multiple view pane displays and stack them up in one panel page. Use jquery to render these different view panes as tabs. I suppose that's similar to your quicktabs solution.

Jason.

Your idea of stacking panel

flapsjack's picture

Your idea of stacking panel panes and using JavaScript is intriguing. I think what I might try is to stack multiple panes, but instead of using JavaScript to show/hide them, I may use Panels visibility rules per pane to show/hide based on url path. That way the page load time isn't affected waiting on multiple views to load.

The only tricky part may be getting the panel node template to continue working even though the url is changing. I like the url alias for my nodes and I'm not sure what panels will do if I add a /view-1 or /view-2 to the end of the url alias.

I'll try and let you know.

Thanks for the suggestions.

Got the same chaleenge

cavla's picture

Hi there,

I was looking for the same thing and i found this thread.

I also want to have multiple contextual views displayed as one tab in one of the regions (displayed as tabs) of my panels.

I find the idea of the "panel visibility rule" + "url" interesting and i might try that but i wanted to check if you got it working?

If not, any suggestions?

The solution i was also looking for was to have a panel in a panel, so each tab of my first panel could display another panel with multiple contextual views.

Let me know if you have anything
Thanks

I ended up using the Panels

flapsjack's picture

I ended up using the Panels visibility rules with the url. It is working as expected but has a few drawbacks. For one thing, the url matching acted strangely when I was using url aliases. So, for the content type I wanted displayed within the panel, I had to disable it from using url aliases.

The other drawback is that management is not optimal, at least in my case. I am using panels to take over when a certain type of node is being displayed. In this default view case, I have one panel that is visible, and the others not visible. If you have the need to add additional tabbed content, you have to not only add a new visibility rule for the new panel, but update the visibility rules of the default panel to ensure it doesn't show up with the new url. Again in my case, this is because the default panel shows when simply viewing the node, not when viewing the node with something appended to the url. My default panel has to have NOT url-based visibility rules to ensure it only shows when no additional url parameters are present.

Hopefully that makes some sense and you can get it working.

Please follow the steps as

charmi's picture

Please follow the steps as below

Create different views.
Make use of quicktabs module over there click on view radio button and fill all the details over there.
create a panel page and add the content from miscellaneous and now u can see a multiple views .

I used Quicktabs with URL

sourcesqr's picture

I used Quicktabs with URL parameters np, haven't tried using it with other context though. Does it work to pass parameters from Panels to Views (panes) via Quicktab?

It's been a while now since I

flapsjack's picture

It's been a while now since I have implemented a fix, but it seems like the context and argument passing with QuickTabs was where I had issues. For some reason, I couldn't get it to work correctly. I think I found some posts where others had similar problems, and there might have been a thread where people were working on some patches. Other than that, I'm not sure where this effort is at this point.

Similar scenario (and my approach)

greta_drupal's picture

Not sure exactly what you are trying to do (maybe you could post screenshots), but it sounds at least similar to something that I have been grappling with for more than a year (D6 and now D7). In my case, my views are dynamic -- parameter is passed from menu selection using Taxonomy Menu, which seems to complicate things. Haven't found a solution using QuickTabs for the tabs.

Haven't yet tried Panels -- just bring myself to install that beast and take the resource hit. Consider it a last resort, but interested to know if it will work in my case.

Anyway, here is my (unanswered) Drupal Stack Exchange post on my issue, with screenshots. http://drupal.stackexchange.com/questions/34621/views-menu-tabs-with-a-d...

Perhaps this will give you some ideas about your scenario. Would definitely welcome suggestions for my scenario too.