Filter a ToC by Metadata - Fluid Topics - 3.6 - Technical Notes

Empower Metadata with Fluid Topics

Product
Fluid Topics
Fluid Topics Version
3.6
Category
Technical Notes
Language
English
Target Audience
public

If an administrator enables the Table of Contents (ToC) filtering option for a metadata element, users can filter the document's ToC by selecting a tag in the sidebar of the Reader page.

For example, the original ToC for the Time Machine Configuration Guide has three topics as follows:

Time Machine Configuration Guide ToC unfiltered

When the user filters on the Novice audience, only two of the three topics remain:

Time Machine Configuration Guide ToC filtered

To appear in the ToC, a child topic must have the same value for the metadata key as its parent topic.

Users can remove the filter to revert to the document's full ToC.

By default, the ToC filtering feature is not enabled.

Example of how to configure content for ToC filtering

To filter the ToC of a document uploaded through the DITA connector by the audience metadata, it is necessary to configure this metadata for all topics and in the DITA map as follows:

  1. Set the audience metadata at the map level.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
    "http://docs.oasis-open.org/dita/v1.1/OS/dtd/map.dtd">
    <map title="time_machine_configuration_guide">
    <title>Time Machine Configuration Guide</title>
    <topicref href="time_travel_history.dita">
    <topicmeta>
    <othermeta name="audience" content="novice"/>
    <othermeta name="audience" content="expert"/>
    </topicmeta>
    </topicref> <topicref href="time_travel_principles.dita">
    <topicmeta>
    <othermeta name="audience" content="novice"/>
    <othermeta name="audience" content="expert"/>
    </topicmeta>
    </topicref>
    <topicref href="time_travel_settings.dita">
    <topicmeta>
    <othermeta name="audience" content="expert"/>
    </topicmeta>
    </topicref>
    </map>

  2. Set the audience metadata at the topic level for the time_travel_history topic.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd">
<topic id="time_travel_history">
<title>Time Travel History</title>
<prolog>
<metadata>
<othermeta name="audience" content="novice"/>
<othermeta name="audience" content="expert"/>
</metadata>
</prolog>
<body>
<p>…</p>
</body> </topic>

  1. Set the audience metadata at the topic level for the time_travel_principles topic.

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
    "http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd">
    <topic id="time_travel_principles">
    <title>Time Travel Principles</title>
    <prolog>
    <metadata>
    <othermeta name="audience" content="novice"/>
    <othermeta name="audience" content="expert"/>
    </metadata>
    </prolog>
    <body>
    <p>…</p>
    </body>
    </topic>

  2. Set the audience metadata at the topic level for the time_travel_principles topic.

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
    "http://docs.oasis-open.org/dita/v1.1/OS/dtd/topic.dtd">
    <topic id="time_travel_settings">
    <title>Time Travel Settings</title>
    <prolog>
    <metadata>
    <othermeta name="audience" content="expert"/>
    </metadata>
    </prolog>
    <body>
    <p>…</p>
    </body>
    </topic>