Site Section with Topicheads

Site sections (<sitesection> elements) can contain <topichead> elements.

Tip: <topichead> elements are useful for semi-complex content that may require some organization in the main table of contents.

They provide a non-linking title or heading.

Site Section with Content and Topicheads

This example shows the site output results of a sitemap with a <sitesection> element that contains a topic reference and two <topichead> elements. Each <topichead> element contains two DITA topics.

<sitemap>
    <!-- Sitemap title -->
    <title>Sitemap</title>
    <sitesection>
        <topicmeta>
            <navtitle>Site Section</navtitle>
        </topicmeta>
        <!-- Referenced DITA Content -->
        <topicref href="content/concept_a.dita"/>
        <!-- Topichead #1 -->
        <topichead>
            <topicmeta>
                <navtitle>Topichead A</navtitle>
            </topicmeta>
            <topicref href="content/task_a.dita"/>
            <topicref href="content/task_b.dita"/>
        </topichead>
        <!-- Topichead #2 -->
        <topichead>
            <topicmeta>
                <navtitle>Topichead B</navtitle>
            </topicmeta>
            <topicref href="content/reference_a.dita"/>
            <topicref href="content/reference_b.dita"/>
        </topichead>
    </sitesection>
</sitemap>
site section with topicheads
output of the site section with topicheads structure

The result is a site section that is displayed in the left pane menu with a hierarchy that reflects the sitemap structure. A link to the site section is also displayed in the top menu.

Note: Topicheads behave similarly to subsections - they group child topics under a common label. However, they are not accompanied with a tile. They only serve as an additional division within the navigation. When you click a topichead, you automatically open its first child topic.

Site Section with Topicheads Only

This example shows the site output results of a sitemap with a site section that contains two <topichead> elements. Each <topichead> element contains two DITA topics.

Note: In this case, the <sitesection> element behaves like a <topichead> element. In other words, in the output, when you click the <sitesection> element, you are moved to the first element with content (“Task A”).
<sitemap>
    <!-- Sitemap title -->
    <title>Sitemap</title>
    <sitesection>
        <topicmeta>
            <navtitle>Site Section</navtitle>
        </topicmeta>
        <!-- Topichead #1 -->
        <topichead>
            <topicmeta>
                <navtitle>Topichead A</navtitle>
            </topicmeta>
            <topicref href="content/task_a.dita"/>
            <topicref href="content/task_b.dita"/>
        </topichead>
        <!-- Topichead #2 -->
        <topichead>
            <topicmeta>
                <navtitle>Topichead B</navtitle>
            </topicmeta>
            <topicref href="content/reference_a.dita"/>
            <topicref href="content/reference_b.dita"/>
        </topichead>
    </sitesection>
</sitemap>
site section structure with topicheads only
output of the sitesection with topicheads only