loading table of contents...

4.4.1.5. Creating Content Queries

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.

The Query List Editor

Figure 4.22. The Query List Editor


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:

  1. Create a new Query List content item

  2. Select in the Selection of content types (2) field which kind of content items should be found by the query.

  3. 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.

  4. Follow the instructions in the first condition field and add a condition.

  5. If required, drag more condition types to the Search query field.

  6. Configure the sorting and number of results in the Sorting of the search query field (4).