Right now, most of the display options of a view are configurable as overrides within a views content pane in a panel - examples being Pager options, which fields to show etc. One missing item is what mode to render content in. This can be really useful for sites that use entity view modes to present content differently in different locations, and use views to help present the lists of data.

This patch adds the ability to override the entity view mode within a panel. To test this:

1) Enable Panels, Views, and Views Content Panes
2) create a view that shows content in teaser mode
3) add a content pane display
4) Under "Pane settings" -> "Allow settings" check the box "Change Entity View Mode".
5) save the view.

6) Create a panel with a node context (or enable and edit the "node template" panel)
7) Create a new variant, and add content to one of the regions.
8) Add the newly created view pane to your panel.
9) Save the panel and view it.

At this point, If this test was done correctly you should see nodes presented in the view's chosen view mode.

Now, Re-edit the panel, select the variant you created and edit the view pane's settings. Change the view mode to a different value, then save.

You should now see the display of the nodes from the view follow the appearance of the panels chosen overriding view mode.

Hope this helps!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

netw3rker created an issue. See original summary.

netw3rker’s picture

FileSize
3.56 KB
dagomar’s picture

Status: Needs review » Closed (duplicate)
kopeboy’s picture

Priority: Normal » Major

THIS IS SO USEFUL and important.

I tried the patch in the linked issue but not working yet.. :(

I tried the patch here, and I got the same problem. The form in the View pane settings and in the Panels pane settings is present, but the changes won't get saved.

The pane in Panels will always have the default "Full content" selected, even if the default in the View is set to Teaser.
Also, showing "Rendered entity" vs "Content" gives the same effect.

And I have a question: why you say to create a panel with a node context?! Why is that relevant if the View content pane doesn't have any Contextual filter?!

kopeboy’s picture

Priority: Major » Normal

Ok I found out the problem is Panelizer module.
Look updates in the linked (non-duplicate) issue.

Thanks to netw3rker for the support :)

ugintl’s picture

Why not use panelizer?