Know how you can create filters in FrameMaker, understand the various guidelines to create filter rules.
After setting up your content using attribute values to create conditional content, you create filters based on the content to show and hide. For example, you can filter your content to target administrators and authors and exclude end-users by creating the following filter:
(audience="admin" or audience="author")
Choose
.The Manage Attribute Expressions dialog appears.
Use this dialog to create, edit, delete and apply filters to DITA topics.
To create a filter, click New.
The Build Expression dialog appears.
In the Expression Tag text box, enter a name for the filter.
In the Attributes list, choose an attribute to create the filter.
In the New Value text box, enter a value for the selected attribute, and then click Add. Repeat this step to add the values that are assigned to the selected attribute in the topic.
Select the type of rule Equal, Any, or Contains Only and click Add Rule.
Filter content that is assigned the values in the Defined Values list for the selected attribute.
Evaluates to true if any of the attribute values matches the specified value.
For example, if the selected attribute is audience and the values in the Defined Values list are admin and enduser, the rule defined is:
(audience="admin" OR audience="enduser")
Filter content for any value of the selected attribute.
Evaluates to true if any of the attribute values contains the specified value.
For example, if the selected attribute is audience, the rule defined is:
(audience #ANY)
Filter content with the only attribute values that are defined in the list.
Evaluates to true if any of the attribute values only contains all of the specified values.
For example, the following rule filters content that is tagged with the admin and enduser values:
(audience # "admin", "enduser")
This
syntax is used as a shortcut to using the OR
operator.
The above example can also be defined using the OR
operator:
(audience = "admin" OR audience="enduser")
Click OK.
Click Done on the Manage Attribute Expressions dialog.