Basic Sitesection
Basic Sitesection with a Map
The following example shows the site output results of a sitemap with a basic sitesection that references a single DITA map. You can recreate the structure by opening the sitemap connected with your portal and appending it with the elements provided in the example. To see how to edit elements listed in the topicmeta
element, go to Add Sitesections to Your Sitemap.
<sitemap>
<!-- Sitemap title -->
<title>Sitemap</title>
<!-- A sitesection that renders as a tile on the home page -->
<sitesection>
<!-- Sitesection details container -->
<topicmeta>
<!-- Tile title -->
<navtitle>Basic Site Section</navtitle>
<!-- Tile short description -->
<shortdesc>Short Description</shortdesc>
<!-- Tile icon -->
<data href="media/portal_icon_blue.png" name="thumbnail"/>
</topicmeta>
<!-- Referenced DITA content -->
<mapref href="content/map_a.ditamap"/>
</sitesection>
</sitemap>
The result is a sitesection and its child topics that are listed one by one in the left pane menu. The link to the sitesection also appears in the top menu.
Basic Site Section with Nested Topics
This example shows the site output results of a basic sitesection that references a structure of nested DITA topics.
<sitemap>
<!-- Sitemap title -->
<title>Sitemap</title>
<!-- A sitesection that renders as a tile on the home page -->
<sitesection>
<!-- Sitesection details container -->
<topicmeta>
<navtitle>Basic Site Section</navtitle>
</topicmeta>
<!-- Referenced DITA content -->
<topicref href="content/concept_a.dita">
<topicref href="content/task_a.dita"/>
<topicref href="content/reference_a.dita"/>
</topicref>
<topicref href="content/concept_b.dita">
<topicref href="content/task_b.dita"/>
<topicref href="content/reference_b.dita"/>
</topicref>
</sitesection>
</sitemap>
The result is a sitesection and child topics that are listed one by one in the left pane menu and their hierarchy is properly reflected. The link to the sitesection also appears in the top menu.
Basic Site Section with Nested Topics and Chunking
This example shows the site output results of a basic sitesection that references a structure of nested DITA topics. The children topics are chunked to the parent topics. For more information on using the chunk attribute, refer to Chunk Attribute.
<sitemap>
<!-- Sitemap title -->
<title>Sitemap</title>
<!-- A sitesection that renders as a tile on the home page -->
<sitesection>
<!-- Sitesection details container -->
<topicmeta>
<navtitle>Basic Site Section</navtitle>
</topicmeta>
<!-- Referenced DITA content -->
<topicref href="content/concept_a.dita" chunk="to-content">
<topicref href="content/task_a.dita"/>
<topicref href="content/reference_a.dita"/>
</topicref>
<topicref href="content/concept_b.dita" chunk="to-content">
<topicref href="content/task_b.dita"/>
<topicref href="content/reference_b.dita"/>
</topicref>
</sitesection>
</sitemap>
To apply an attribute-value pair to a parent topic, hover over the topic and click the gear icon to edit properties of the topicref
element. In the properties window, you can set the chunk
attribute to to-content
.
The result is a sitesection and top-level topics that are listed one by one in the left pane. Contents of the child topics are displayed under their parents' URLs. Child topics are not listed in the navigational menu.