List Page

Use the List Page to pull in pages from around the site, using a data query such as a tag. : List Pages no longer show any body content. Intro content can take HTML formatting :

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. Were there no query to be 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.


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

The page will automatically show all of the tags that are used on all of the pages pulled into this List. To manually create a more organised set of filters, see the Searchgenres page.

Show/hide map

Under Data Sources, you see a tick box for "Hide Google Maps". A List Page with NDTRC items that are Location Article Pages can display all the locations on a Google Map instead of having just the cards show in rows. If you want the Google map to show, untick this box. NoteThe map only works for NDTRC Location items. Editorial pages with contact information filled out will initially show on the map, however you won't be able to click through to the page itself.





0 results