Use Detail view with multiple items
Overview
Content widgets configured in Detail mode usually display the details of a single item. An alternative use of the Detail view is to register content locations for all items of a given content type on a dedicated details page, without displaying any items on that page by default.
This setup uses two widgets of the same content type on two different pages:
- Detail widget
A content widget that is set to display all published items and whose content view display mode is set to Detail.
On the page, the widget does not display any content items. However, the widget registers the page as a content location for all existing items of the selected content type. As a result, the details of each item are accessible through the URL of this page. - Master widget
A content widget of the same content type on another page, whose content view display mode is set to Master and which references the page with the Detail widget.
The widget displays the list of content items. Clicking an item opens its details on the page with the Detail widget, through the registered content location.
For more information about content locations, see Locations of content items.
The Next.js Renderer uses the Content list widget for this setup. The widget works with any content type that it supports. For more information about the widget, see Content list widget.
Configure the Detail widget
- Create a page that will display the details of the items. For example, News details.
- Open the page for editing and add a Content list widget to it.
- Click Select content.
- In the Content type dropdown box, select the content type whose items to display. For example, News.
- In Selection range, select All published items.
- In the upper-right corner of the widget designer, click
(Advanced settings). - In the Content view display mode dropdown box, select Detail.
- Save the widget settings.
- Publish the page.
As a result, the widget does not display any content items on the page, but the page is registered as a content location for all published items of the selected content type.
Configure the Master widget
- Create or open another page that will display the list of items. For example, News.
- Open the page for editing and add a Content list widget to it.
- Click Select content.
- In the Content type dropdown box, select the same content type as for the Detail widget. For example, News.
- In Selection range, select the items to display in the list.
- Under Single item settings, in Open single item in..., select Selected existing page….
- Select the page with the Detail widget configured in the previous procedure. For example, News details.
- In the upper-right corner of the widget designer, click
(Advanced settings). - In the Content view display mode dropdown box, select Master.
- Save the widget settings.
- Publish the page.
As a result, the Master widget displays the list of content items. Clicking an item opens its details on the page with the Detail widget, through the content location registered by that widget.
For more information about the Content view display mode setting, see Advanced widget settings.