Documentation Center

Table of contents customization

We recommend you customize the table of contents (TOC) only using the custom_toc_prepare_after.xsl file located in the XSL\DITA directory.

Overview

custom_toc_prepare_after.xsl is the dedicated skin file for the TOC. Configuration options described in the global config reference let you set when this file should be loaded.

If you decide to modify toc.xsl directly, then make sure you port the changes to mapToc.xsl so the changes in those two files are always synchronized.

The "submap" icon

In the default table of content skin, in addition to the topic icon (depicting a file) and the expand/collapse icon (an arrow), an icon shows the location of maps:

The letter "S" stands for "submap", as every map is included in another map, up to the rootmap. The rootmap itself is not marked with this icon.

Knowing where your maps are is important when it comes to edit your content in Legacy Content Delivery using Content Editor. Adding a topic requires that you check out the map that contains this topic, and only this map. All the other maps are left unchanged, whether they are children, parents or siblings. Therefore, the "submap" icon lets you anticipate the impact that your topic addition will have on your publication structure.

The out-of-the-box implementation of this feature rests on the following elements:
  • An image file: \WEB-INF\db\LiveContent\ui\skins\base\img\ico-submap-16x16.png
  • A submap attribute in the <map> class.
  • Javascript code in /WEB-INF/db/LiveContent/ui/skins/base/js/lcContent.js to act on the hidden attribute for nodes:
    $("div[submap]").find("img.lc_toc_expand_img_submap.hidden:eq(0)").removeClass("hidden");
  • Processing rules for attaching images to expanding nodes, in both /WEB-INF/db/LiveContent/ui/skins/base/xsl/common/mapToc.xsl and /WEB-INF/db/LiveContent/ui/skins/base/xsl/common/toc.xsl:
    <xsl:call-template name="lcui:img">
        <xsl:with-param name="class">lc_toc_expand_img_submap hidden</xsl:with-param>
        <xsl:with-param name="file">ico-submap-16x16.png</xsl:with-param>
    </xsl:call-template>
  • CSS style in /WEB-INF/db/LiveContent/ui/skins/base/css/base.css:
    .lc_toc_expand_img_submap {
        margin-left: -19px;
        padding-top: 2px;
    }
Removing this feature requires that you either:
  • comment out the Javascript code or
  • in the CSS, make the .lc_toc_expand_img_submap invisible (for example by including visibility: hidden;) or
  • comment out the processing rules.