A Content Query dynamically selects content items (Articles, Videos, Products, Pictures) that fulfill specific conditions. Content Queries are created in Query List content item. A Query List content item can be seen as a dynamic collection and can be used in all places where Articles and the like are used.
You can use five different condition types:
- Modification Date
The last modification date of the content item
- Context
The context to which the content item belongs.
- Tag (Subject)
The subject tags which are attached to the content item.
- Tag (Location)
The location tags which are attached to the content item.
- Tag Context
This condition has no parameters, because the tag is dynamically calculated during the request of the site. If the request contains a keyword, only content items that contain this keyword are selected. This way, you can show, for example, content that is relevant to the interests of the current user.
Creating a Query List
In order to create a new Query List you can proceed as follows:
Create a new Query List content item
Select in the Selection of content types (2) field which kind of content items should be found by the query.
Drag a condition type from the Possible conditions field (1) to the Search query field (3).
A new empty condition field will be added below the first condition field.
Follow the instructions in the first condition field and add a condition.
If required, drag more condition types to the Search query field.
Configure the sorting and number of results in the Sorting of the search query field (4).