Generate dynamic content output

The dynamic content feature allows you to create output that your users can easily filter based on parameters that you define using Conditional tags. For example, you can create a filter that allows your users to filter the output by region (US, UK, or Canada) and by audience (end-user, online, and print). Dynamic content also allows your writers to easily single-source content with the help of Conditional tags.

With this feature a writer creates Conditional tags depending on the filter criteria that you want to provide to your users. For example, you can create conditional tags: US, UK, and Canada for region and End-user, Online, and Print for audience.

When you generate the output using the filter, the filter tab is displayed that allows users to filter the contents based on the criteria (tag/expression) selected in the filter in the output SSL.

Also, a user can then use the search functionality to find content within the filtered results.

note:    Dynamic content filters can be applied to Responsive HTML5 and Mobile App outputs.

Tag content

To create a dynamic content filter in your output, you apply Conditional tags to the required parts of your project on which you want your users to filter. In case of structured documents, you can use the element attributes to conditionalize content.

You can apply multiple conditional tags or attributes to the same section of your content. For example, you can apply the US and Canada tags to a topic that you want to target at your North American customers. You can then tag an alternate topic to target your UK customers. In the output, a user then has the option to filter content based on the region. You can also use an expression such as US AND Canada to create a filter criteria titled North America.

Also, you can apply tags to content in any combination. For this reason, when you apply tags, you need to keep in mind how the output will display based on the output filtering mechanism. For an example on how filtering works, see Use a dynamic content filter in the output.

Untagged content

When you use dynamic filters in a document, you are not required to tag all your content. Any content that is untagged is unconditional. This implies that untagged content will display to the user regardless of the filter.

Create a dynamic content filter

You can create one dynamic filter for each layout.

1)In the Output tab, click a layout (Responsive HTML5 or Mobile App).

2)In the layout General settings dialog, check Use Dynamic Content Filter in the Output.

The Dynamic Content Filter dialog is displayed.

3)When you create a filter, you can define groups that include the filter criteria (tags and expres­sions).

For example, you can create a Region group that includes the US, Canada, and UK conditional tags.

For unstructured document, you can also use expressions as criteria in a filter. For example, you can create a filter US AND Canada and then provide your users with a North America criteria option in the output.

For structured documents, you can use the DITA attributes to create filter criteria.

note:    You can add tags and expressions to your filter without including them in any group. This implies that you can create a filter that does not include any groups. Or you can create a filter that contains one or more groups and tags or expressions that are not included in any of the groups.

important:   You cannot create nested groups. This implies that a group cannot contain another group.

4)To add a tag or expression to a group, click the Add Criteria and select the tags and expressions from the Tags and Expressions dialog.

note:    You can add one instance of a tag or expression in a dynamic filter. For this reason, if you add a tag or expression to the filter, notice the tag or expression does not display in the Tags and Expressions dialog.

When you add a tag or expression to a filter, the display name for the tag or expression displayed in the filter is the name that you give when you create it. However, you can change the display name in the filter for output display purposes. Also, the display name that you specify in the filter does not change the name of the tag or expression in the project.

note:    You can also include special characters in the display name of the tag or expression, except these characters: colon (:), semi-colon (;), comma (,), percent (%), ampersand (&), hash (#), and equals (=).

For structured documents, to add an attribute to a group, click Add Criteria and select an attri­bute from the Conditional Attribute drop-down list. Once you have selected the required attri­bute, specify its value in the Attribute Value field. You can also specify a Display Name that will be seen by the users in the published output.

Selecting an attribute from the Select ConditionalAttributedialog

5)You can choose to filter content by default. This implies that when the output displays, the content is filtered to a predefined criteria .To set the default tag or expression in the filter, right-click the tag or expression and choose Select Default.

6)To change the display name of tag or expression in the filter, right-click the tag or expression and choose Rename.

note:    When you rename a tag, the status message that displays at the bottom of the Edit Filter dialog displays the name of the tag and not the display name.

note:    Group names within a filter must be unique. Tag or expression display names within a group must be unique. The check for unique display names is case-insensitive. For example, you cannot create two display names End-User and END-USER within the same group.

7)To allow your users to select multiple filter criteria in one group in the output, check Allow multiple selection in output.

8)Use the navigation arrows to move the groups, tags, and expressions within a filter.

For example, to move a tag out of a group, click the left arrow. This moves the tag to the same level as the containing group and just above the group. Use the right arrow to move a tag that is outside any group into the next group. You can also move the tags up and down in the group.

9)Click Save.

10)In the layout settings dialog, click Save and Generate.

Use a dynamic content filter in the output

This section uses an example to describe how to use the dynamic content filter in the output and what to expect when you apply tags to the content and use the tags in the filter.

After you assign a dynamic content filter to a layout, you can generate the output for the layout.

The output now contains a filter icon. Click the filter icon to display the dynamic content filter assigned to the current layout.

important:   If a tag is not assigned to any content in the output, the tag is not displayed in the filter. So, if all the tags within a group are not displayed in the filter, the group is not displayed. Also, if a tag is not used in the filter (as tag or as part of an expression), then this tag is removed from the content it is applied on in the project.

By default, all the groups and criteria in the filter are unselected. This implies that all content is currently displayed (unconditionally) since no filter criteria is currently applied. However, if you set a default while creating the filter, the default group displays selected.

To filter the contents, you check and un-check the groups or criteria in the filter.

The following sections detail two scenarios to describe how the dynamic content filtering mecha­nism works:

Select one criteria (tag or expression) in a group

In Sales Builder filter, if you check US in the Region group:

All content marked with the US tag displays.

All content marked with a combination of the US tag and any other tag displays.

Content marked with the US and UK tag displays. But a topic marked with the UK tag is hidden. Also, content marked with the UK and Canada tags will be hidden.

All content marked with tags in the Audience group are not displayed unless the content is combined with the US tag.

Content marked with the US and PDF tag will display. But content marked with the PDF tag is hidden. Also, content marked with the UK and Print tags is hidden.

All untagged content displays.

Select one criteria in one group and another criteria in a second group

In Sales Builder filter, if you check US in the Region group and Print in the Audience group:

All content marked with only the US tag displays.

All content marked with only the PDF tag displays.

All content marked with any other tag or combination of other tags is hidden.

All content marked with a combination of the US and PDF tags displays. However, content marked with a combination of a US tag with any other tag is hidden. Similarly, content marked with a combination of a PDF tag and any other tag is hidden.

Content marked with the US, Print, and Online tags displays. However, content marked with US and Online or Print and Online is hidden.

All untagged content displays.

Test the dynamic content filter

After you create and apply a dynamic content filter to the output, you can use Show Tagged Output option to test your filters. This option generates the output with the tags displayed in the contents at the applied locations. You can then select the filter criteria and test how your filter works.

To generate the tagged output:

1)In the Publish pod, right-click on the required output (Responsive HTML5 / Mobile App).

2)Select Show Tagged Output.

The tagged output is generated.


January 9, 2018

Legal Notices | Online Privacy Policy