Documentation Center

Filters

A filter defines an attribute you want to filter content on. You can specify static or dynamic filters.

Static Filters
A static filter defines a fixed value, or values, to filter content on. You select the values from a list, such as a list of Keywords.
For example, if you have a general Folder for Components that contain the contents of the what to show but you just want to show Components which use the Keyword Amsterdam in a particular field, create a filter City Is Amsterdam to filter on Components that contain this Keyword.
Dynamic filters
A dynamic filter is an abstract filter whose value is filled at runtime taken from the visitor's current context. A dynamic filter allows you to create a single Promotion used on several webpages, covering several scenarios instead of having to create a Promotion for each.
For example, on a landing page for a car website showing different brands, the make of the car is a parameter so that you do not need to change the Promotion when additional car makes are added (/car.aspx?brand=bmw). The Promotion shows content in a sidebar. The source of the content is a Folder where components are classified using the Keyword Brand. This Keyword is added to the Elasticsearch query so that the Promotion filters content on Brand Trigger whose value is provided at runtime.
Filter syntax
There are three parts to a filter:
  • the attribute or field you want to filter on
  • the operator
  • the value
    • custom value—a user-entered value
    • static value—a value selected from a list
    • dynamic value—a trigger whose value will be used at runtime based on the visitor's current context
Filter handling
Filters are handled as follows:
  • Multiple values for the same filter are OR statements (displays content if either the first condition OR the second condition is true).
  • Multiple filters are handled as AND statements (displays content if both the first condition AND the second condition are true)
Localized filters
Filtering of content (Components) occurs on the selected Publication level, and not at Child Publication level. Consequently, content is always filtered on the same value regardless of whether the filter value has been changed in Child Publications (localized Components).
For example, if you create a Promotion and add a filter to filter content on the Keyword red, when triggered the Promotion returns content (Components) that match the field color red. If you localize Components in Child Publications, and change the field color to blue, when the Promotion is triggered in a Child Publication you might expect that these localized Components are not returned. However, because filtering takes place in the Parent Publication, these blue Components are returned when the Promotion is triggered in the Child Publication.