#### 18.9.5 Configuring contents entries for HTML Help

Headings that start topics, or to which you assign the Contents property or a contents level, are automatically included in the TOC; see the following:

§16.4.2 Including contents entries in HTML-based Help.

§16.4.3 Setting contents levels for HTML-based Help.

Even if you assign the Contents property to several heading levels in the same topic, the resulting TOC links always take you to the top of the .htm file that contains the link destinations. You can provide true mid-topic links in the TOC, but at a cost; see §18.9.6 Providing mid-topic contents links in HTML Help.

Split at each heading level

The best way to ensure that each TOC link goes to an exact destination is to split your DITA document at each heading level. Each heading becomes the start of a topic instead of being in the middle of a topic, and TOC entries synchronize with topic content.

No-link entries require a binary TOC

To include a paragraph format in the TOC but omit the link:

    [HTMLParaStyles]
    ; NoContLink suppresses linkage for its Contents item in MS HTML Help;
    ;  the item remains in the Contents pane, but clicking it does not
    ;  bring up the corresponding topic in the main pane.
    ParaFmt=Contents NoContLink

You can use this feature to include section headings in the TOC. To make a no-link paragraph appear only in the TOC, and not in any topic:

    [HTMLParaStyles]
    ParaFmt=Contents NoContLink Delete

Note: If you specify NoContLink but you do not also specify a binary TOC in HTML Help Workshop, the NoContLink entries disappear from the TOC; and so do any parent entries, unless there is at least one split below the parent that does not itself have any NoContLink subentries. This is a limitation of HTML Help.

Skipped heading levels

If your document skips a heading level (for example, a level 3 heading follows a level 1 heading with no level 2 heading in between), HTML Help promotes the level 3 heading to level 2 in the contents. However, HTML Help does not promote additional level 3 headings in the same subgroup: two or more level 3 headings in succession result in the first appearing with a book icon, and the rest with page icons subordinate to the book icon.

To avoid this problem, DITA2Go moves the whole hierarchy up one level. In the example in §18.9.4 Generating contents and index with DITA2Go, all level 3 headings in the same subgroup that follow a level 1 heading would show the same indent in the contents; however, that indent would not be the same as for level 3 headings that follow a level 2 heading.

See also:

§16.4 Configuring contents entries for Help systems

§18.9.6 Providing mid-topic contents links in HTML Help

Previous Topic: 18.9.4 Generating contents and index with DITA2Go

Next Topic: 18.9.6 Providing mid-topic contents links in HTML Help

Parent Topic: 18.9 Generating contents and index for HTML Help

Sibling Topics:

18.9.1 Choosing how to generate HTML Help contents and index

18.9.2 Choosing whether to generate binary contents or index

18.9.3 Generating contents and index with HTML Help Workshop

18.9.4 Generating contents and index with DITA2Go

18.9.6 Providing mid-topic contents links in HTML Help

18.9.7 Making the TOC track index links in HTML Help

18.9.8 Customizing contents and index for HTML Help

Table of Contents • Index