Updated: 12 June 2020

The List Page template is a rather straightforward template with no room for widgets. It is used to create an overview of pages or articles from around the site. This is done using what's called a Datasource Query. If there is no query set, the List Page will automatically show all underlying pages.

How does it work?

In your List Page under Data Sources, click "Build query" above the Datasource Query field. You will see that by default it fills in "Location". There are a number of query options you can set. Below are the most common:

Pull in items based on a Tag

Say you want to create an page with an overview of all restaurants in Amsterdam.

How to - In the search bar, type "tag" and press enter. When the box comes up, enter the name of the tag, "restaurant". (Note: this bar can be a bit fussy, it might turn the query into "text: tag". Just delete that one and try again.). Hit the search button (magnifying glass). Note: the search results don't correspond with what is actually displayed on the front end. Don't let that scare you. Just check the front end once you've published your page that your query has worked. When it's done searching, click "OK".

Pull in items based on a Location in the Sitecore tree.

Say you want to create a page with an overview of business news article about China, but only articles from 2016.

How to - First, you will need to find the ID of the page under which all 2016 news articles live. In this case that's /sitecore/content/Home/business/News/2016. Under Quick Info copy the Item ID: {2008D314-08A6-4038-A86A-534BE68F743D}. Go back to your Build query, type "Location", hit enter, and paste the Item ID there {2008D314-08A6-4038-A86A-534BE68F743D}. 

Additionally, set your tag query as above, adding tag "bizchina". 

Run the search and hit OK. This will display all news articles tagged "bizchina" from 2016.

Pull in items based on the type of Page Template.

Say you want to create a page with an overview of events taking place in Haarlem.

How to - You can create a query based on the tag Haarlem "amahaarlem", but this will pull in ALL pages with this tag, including editorial pages, landing pages, list pages, etc. To filter those out, add a Template query. In this search bar, as above, type "template" and hit enter. You can filter on any page type you like here. Here are two other options:

Event Article Page: NDTRC items that are events

Location Article Page: NDTRC items that are locations

For our example we would choose the Event Article Page. This will pull in all events tagged Haarlem.

Recap

Above are the three most-used queries for a List Page. A couple things to note:

Combing the above options in one query helps to filter search results. The options together are seen as AND. However, multiple queries of the same type (two tags, for instance) won't work as a filter, they are seen as two individual queries (a OR b). Thus, setting a query with two tags "restaurant" and "amahaarlem" will pull in everything tagged with either. It will not show only restaurants in Haarlem.

Setting the filters at the top of the page

To set up the suggestions in the Search box, go to the General tab in the Content Editor. Under Most searched tags add the tags you want. These should remain rather broad. In the Search field placeholder text you can add just that.

To set up filters, see the Searchgenres page. Add your filter under Filters under the Data Sources tab in the Content editor.

Show/hide map

Since June 2020 the template can toggle between list and map. The "Hide Google Maps" tick box remains in Sitecore - keep ticked if you do not need the map to show. The map will show both NDTRC Location Article Pages as well as Editorial pages with contact information filled out. The latter is new!

Header image

There is no longer a header image on the page! HOWEVER. Do set a "background image" in the Content editor as this will still show as the card image on Search results pages and other widgets and overviews the page shows up.