Set attributes

After you create the filters in a topic, you can use these filters to show or hide content based on applied attributes. To filter content in a topic, you apply attribute values to the elements in the content (Set attribute values for elements). You then create filters based on the attributes applied to the content (Create filters). To show or hide the content based on the filters, you need to apply the specific filter to the content.

important:   An element that is not tagged with any attribute is unconditional. This implies that the content within elements that are not tagged is shown irrespective of the filter applied to the topic. The benefit of this functionality is that you do not need to tag every element in a topic. Elements that are not tagged with any attribute are not effected by any filter.

For example, say you apply the audience attribute (with values: admin, author, and end_user) to different parts of the content. You then create multiple filters:

(audience=”admin” or audience=”author”)

Filter content targeted at administrators and authors.

(audience #ANY)

Filter content targeted at administrators, authors, and end users.

This means that you will apply a different filter depending on the required output.

At any point, you can apply only one filter to a topic. This means that you can create any number of filters and then depending on the required output, you apply the appropriate filter.

Apply a filter

1)Open the Manage Attribute Expressions dialog (Special > Filter by Attribute).

2)To filter the content, choose Show as per Expression and select the required expression.

For example, the following expression filters content that is tagged with the audience attri­bute set to admin or author:

(audience=”admin” or audience=”author”)

This implies that any element tagged with the audience attribute set to any other value is excluded. However, if an element is not tagged with the audience attribute, it is not excluded.

In the Filtered Text group, you choose how to filter the content:

Hide

Hide content as per the filter expression.

Preview with color

Display the font color of text as per filter expression with the selected color. Use this option for review purposes.

note:    Use this option for content that is text-based. For example, if you apply this option to a table element, the font color of text in the table is not applied.

Apply Condition Tag

Apply a conditional tag to the filtered content.

From the drop-down list, choose the conditional tag. The selected conditional tag is then applied to the filtered content.

For example, say the audience attribute of conditional elements in a topic are tagged as admin, author, and end_user. If you apply the following filter to a topic:

(audience=”admin” or audience=”author”)

The filter excludes elements tagged as end_user. If you choose the Apply Condition Tag option, the selected conditional tag is applied to the excluded elements. For details on how to apply conditional tags and show / hide content using conditional text, see Conditional text.

3)Click Apply.


September 30, 2016

Legal Notices | Online Privacy Policy