Collections
Last updated
Last updated
With collections you can define a set of filters that is applied to all documents in a repository. The result is a subset of documents that match these rules.
Create lists of products, categories, display articles or elements of a section of your site, collect dates or aggregate sets of data.
Your collections are displayed in the Content Tree. When you click on a collection node, a list of documents matching the collection query will be displayed. The list will be constantly updated as you're adding, removing or making changes to documents.
This makes it easy for editors to recognize and manage content or certain parts of their website or application.
To create complex collections or dynamic filters inside your application, take a look at the API filters documentation.
Each collection provides a REST endpoint to use in your application. You can also add additional or override existing filters when making the request.
For more info see collection endpoints or API filters.
Use the API Explorer tab to inspect a collections result.
To add a collection you'll need to add a collection node
to the Content Tree by clicking or dragging the icon above the tree.
Enter a name for the collection (this will also be the name of the tree node) and an API-Id
to define a URL slug
for the API endpoint.
After saving, a node will be added to the Content Tree that can be moved or nested anywhere you like. For the API a collection is always unique by its URL slug and it makes no difference where the node is located in the tree.
Right-click the collection node in the tree
Click 'Configuration'.
Or:
Switch to the collection view
by clicking the tree node.
Click the 'Configuration'-Button on the right top.
Choose the type of document the collection rules will be applied to. For multiple types, have a look at API filters.
Add documents to the collections that have the given tags
.
Exclude documents from the collections that have given tags
.
Filters are conditional expressions and can be used like you would write an if statement. You can also use multiple conditions by using AND
and OR
.
The following field types and operators can be used to create a condition:
Field Type | Operators |
| =, !=, IN, LIKE, NOT LIKE, EMPTY, NOT EMPTY |
| =, !=, IN, LIKE, NOT LIKE, EMPTY, NOT EMPTY |
| =, !=, IN, LIKE, NOT LIKE, EMPTY, NOT EMPTY, >, >=, < , <= |
| = , !=, IN, LIKE, NOT LIKE, EMPTY, NOT EMPTY, >, >=, <, <= |
| = |
| =, !=, IN, LIKE, NOT LIKE, EMPTY, NOT EMPTY, >, >=, <, <= |
| =, !=, IN, EMPTY, NOT EMPTY |
| IN, NOT IN, EMPTY, NOT EMPTY |
Most operators are self-explaining if you are familiar with logical operators. However, here is a quick reference.
Operator | Convention | Explanation |
| equal | Validates true for a matching value |
| not equal | Validates true for non-matching values |
| greater than | Validates true if the field value is greater than the specified value |
| greater or equal | Validates true if the field value is greater or equal to the specified value |
| lower than | Validates true if the field value is lower than the specified value |
| lower or equal | Validates true if the field value is lower or equal to the specified value |
| like | Validates true if a field value matches. Possible usage: |
| not like | Validates true if a field value does not match. Possible usage: |
| empty | Validates true if the field value is empty |
| not empty | Validates true if the field value is not empty |
| in | Validates true if a value exists in an array |
| not in | Validates true if a value does not exist in an array |
To order the list of documents, choose one or multiple fields and a direction for each field.
Field types available for sorting:
text
richtext
number
date/time/datetime
boolean
location
select
color
Switch to the collection view
by clicking the tree node.
Click the 'Configuration'-Button.
Find and click the 'Delete Collection'-Button on the bottom of the configuration page.
Confirm.
This will remove the collection node from the tree and disable the endpoint.
Deleting a collection will not delete any documents.