Create attribute filters

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")

Create a filter

  1. Choose View > Filter by Attribute.

    The Manage Attribute Expressions dialog appears.

    Figure 1. Manage Attribute Expressions dialog
    Manage AttributeExpressions dialog in Adobe FrameMaker

    Use this dialog to create, edit, delete and apply filters to DITA topics.

  2. To create a filter, click New.

    The Build Expression dialog appears.

    Figure 2. Build Expression dialog
    Build Expressiondialog in Adobe FrameMaker

  3. In the Expression Tag text box, enter a name for the filter.

  4. In the Attributes list, choose an attribute to create the filter.

  5. 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.

  6. Select the type of rule Equal, Any, or Contains Only and click Add Rule.

    Equal:

    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")
    Any:

    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)
    Contains Only:

    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")
  7. Click OK.

  8. Click Done on the Manage Attribute Expressions dialog.

Important: The options described in the above steps are tools that enable you to create rules. However, you can enter the rule in the Expression text box.