Generating filters

About this task

Instead of writing a predefined filter in your Page Template or Component Template, you can also create a Placeholder (a combination of a Component Schema, a Component and a Component Template) to generate filter code dynamically. This Placeholder is purely conceptual; it does not exist as a predefined entity in the Content Manager Explorer.

To implement a Placeholder that generates filters, do the following in Content Manager Explorer:

Procedure

  1. Create a Component Schema that specifies metadata fields to query on.
  2. Create a Component that supplies the values for these metadata fields.
  3. Create a Component Template that combines the information from the Schema and the Component to produce a Component Presentation consisting of filter script code.
  4. Place the resulting Component Presentation on a Page and publish the Schema, Component, Component Template and Page.

Results

Visitors of the published Page will now see the result of the filter in the position where the Component Presentation was placed.