Site Section with Versions
Versioned site sections can include multiple versions of the same content.
Basic Site Section with Versions
The following example shows the site output results of a sitemap with a <sitesection>
that
contains two version
elements that reference two different versions
of a map.
<sitemap>
<!-- Sitemap title -->
<title>Sitemap</title>
<!-- A sitesection with versioned content -->
<sitesection outputclass="view-toc">
<topicmeta>
<navtitle>Versioned Site Section</navtitle>
<shortdesc>Short Description</shortdesc>
<data href="media/portal_icon_navy.png" name="thumbnail"/>
</topicmeta>
<!-- Version #1 container -->
<version>
<!-- Version details -->
<topicmeta>
<!-- Version information that will be visible in the version drop-down menu -->
<navtitle>v1.0</navtitle>
</topicmeta>
<!-- Referenced DITA content -->
<mapref href="content/map_c_v1_0.ditamap"/>
</version>
<!-- Version #2 container -->
<version>
<topicmeta>
<navtitle>v2.0</navtitle>
</topicmeta>
<mapref href="content/map_c_v2_0.ditamap"/>
</version>
</sitesection>
</sitemap>
When you click the site section in the navigation menu, you will not be redirected to the first topic in a map as usual. Instead, you will be presented with a set of tiles. Each tile represents the top-level element in the versioned map. Tiles are accompanied with a dropdown for choosing between different versions.
navtitle
element of your versions.To learn how to add versioned maps to the sitemap, refer to Add Versioned Maps to Your Portal Sitemap.
Add Versioned Maps to Your Portal Sitemap
Your portal supports versioned content out of the box. To show multiple versions, you need to obtain map references to different versions of your documentation.
For this process, you will use different versions of the same map. For ease of content management, we recommend that each version of the document be located on a separate CCMS content branch. To learn more about branching and versioning, see Versioning Overview.
Go to your Heretto Portal and refresh it. Navigate to the newly created versioned section. You should now be able to switch between its different versions.