Gretyl's Portal

Heretto Help

Site Section with Versions

Versioned site sections can include multiple versions of the same content.

Tip: Site sections with versions are useful if you want to publish different releases of the same content.You can reference resources from different Heretto CCMS branches. For more information about versioning in Heretto CCMS, see Versioning Overview.

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>
basic site section with versions

The result is that articles within your versioned map will be accompanied with a dropdown that enables readers to choose between different versions.

Note: To have the version dropdown show on desktop devices, be sure to add outputclass="view-toc" on the <sitesection> element that contains your versioned content.

Readers will be able to see a version number in the breadcrumbs section on the top of the screen.

output of a basic site section with versions

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.

output of a basic site sections with versions
Note: The “v” phrase is added automatically before the version number. Therefore, you do not need to add it in the navtitle element of your versions.
Tip: You can version content on different sitemap levels. For more information, see Site Section with Subsections.

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.

Note: Cross-branch linking is not the default option. Contact your Customer Success Manager to make sure this setting has been enabled on your Heretto CCMS instance.
  1. Open the sitemap connected to your portal.
  2. Right-click the sitemap element and append it with the sitesection element.
    Figure 1. Appending Operation
    appending sitemap element with sitesection element
  3. Right-click the sitesection element and append it with the topicmeta element.
    The topicmeta element will contain elements responsible for the way your section is displayed online.
  4. Right-click the sitesection element and append it with the version element.
  5. Right-click the version element and append it with the topicmeta element.
  6. Right-click the topicmeta element and append it with the navtitle element.
  7. Edit the navtitle element to display the desired version number.
    1. Hover over the navtitle element and click the gear icon.
      On the right, the attributes pane appears.
    2. In the top-right corner of the attributes pane, click the pencil icon to edit the contents of the navtitle element.
    3. Edit the contents of the navtitle tag.
      <navtitle>1.0</navtitle>
      Note:

      By default, Heretto Portal will automatically add the “v” phrase before the version number. Therefore, you do not need to add it in the navtitle element.

    4. Click Save.
  8. Right-click the version element and select Append > From existing file.

    The Select File window appears. On the top of the screen, you should be able to see the breadcrumbs section with your current file path.

  9. Select a map that you want to tie with this version.
    1. If the map is in a separate branch, click the branch name at the beginning of the file path.
      changing the current branch
      Note:

      If the map version you want to add is in the same branch as your sitemap, you only need to drag and drop that map into the version element.

    2. Switch to the branch with the map version that you want to add.
    3. Navigate to the map and click Select.
  10. Repeat the process described in 4 for every version you want to add.

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.