Creating nested lists with panelizer and view panes

The following is my approach for solving this request. A step by step guide:

1. Creating a view pane like the following:

image_1

In this view, the displays are created. We have two different ones. The selected one shows the finalists of the year, which is added via a contextual filter. The second one shows the winner.

The view will show winners or finalists for a given year based on the contextual filter configured. In order to use the view with panels, we created displays of type view pane. Note that in the pane settings, we specify the argument input to get the required context from panels. Thus the argument input is set up like this:

image_1.1

Later in step 3. When we add the displays to the panelizer, we will set the argument.

2. Panelize the taxonomy

In order to have these two views sorted by years, they will be attached to the “Year” taxonomy, to do this we need to panelize it.

image_2

The new view mode configured is displayed a bit wrong in panelizer for the taxonomy. So we have to go via Structure -> Taxonomy -> Year -> Panelizer -> list_winner_finalists.

3. Attach the winner and finalist view panes to the panelized taxonomy

image_3

After panelizing the taxonomy we can attach the before created view panes to it. As described, first winners and then the finalists. Use the top left gear icon, Add content and select view panes to choose from the defined view pane displays.

We have set the argument input in step 1 and now we need to select it here to provide the taxonomy terms as context to the view panes:

image_3.1

4. Creating a taxonomy view

image_4

Last step is to create a view which shows the taxonomy that uses the panelized viewmode and to sort this view by year.

5. Be very happy with the result:

We list all the years from most recent to earliest. And for every year we list the winner and multiple finalists.

image_5

The final result can be seen live here:
https://www.resourceaward.org/winners-finalists

 

Tags: