Developing filters
Use filters to dynamically select the Component Presentations you want to appear on a Page. A filter queries Component metadata in the Content Data Store. You develop queries in your Component Template or Page Template. This section explains how to create or generate a filter and process the results returned.
To run a query, create criteria in a Criteria object, feed that object as a parameter into a constructor for the class Tridion.ContentDelivery.DynamicContent.Query and then run one of the following methods on the class:
ExecuteQueryorexecuteQuery-
Returns an array of Content Manager URIs (unique identifiers) as
Strings. UseexecuteQueryif you only need the URIs of the items, typically the case if you intend to pass on the results of the query to another class for further processing such asPageContentAssembler. ExecuteEntityQueryorexecuteEntityQuery-
Returns an array of objects matching the query. Use
executeQueryif you need direct access to the items' properties.