##### 14.7.3.5 Customizing and linking to the index file

To include a link to the index from the TOC, and to provide code to customize index features:

    [Inserts]
    ; For index files generated for HTML with [Index]UseIndex=Yes:
    ; IndexHead is within the index-file <head> element, after <title>.
    ; IndexTOC is inserted at the end of the TOC.
    ; IndexTop is at the top of the index-file body, after any JS link.
    ; IndexBottom is at the bottom of the index-file body.

For example:

    [Inserts]
    IndexTOC=<$IndexTOCEntry>
    IndexTop=<$IndexHeader>

If you set [Inserts]IndexTOC to your own code or macro, DITA2Go uses your code, instead of generating built-in code with the value of IndexTOCClass (default IndexTOC) as class and IndexFileTitle (default Index) as content. This means your code must specify class and content of the link from the TOC to the index. You can reference the index file with predefined macro variable $$_indexfilename:

    [IndexTOCEntry]
    ; Link from the TOC to the index:
    <H2 align="left" class="PartTOC">
    <a href="<$$_indexfilename>">Index</a></H2>
    [IndexHeader]
    ; A roll-your-own title for the index (see d2html_macros.ini):
    <H2 align="left" class="IndexHeaderClass">Index</H2>
    <br /><br />

For other index specifications DITA2Go provides Use* settings, so if (for example) you want your own heading to replace the one DITA2Go generates, you would set UseIndexHeading=No and assign code or a macro to [Inserts]IndexTop.

See also:

§27.6.2 Assigning code to [Inserts] keywords for splits and extracts

§37.3.4 Using predefined macro variables.

Previous Topic: 14.7.3.4 Including heading letters in the index

Next Topic: II. Configuring print RTF output

Parent Topic: 14.7.3 Configuring index features for HTML output

Sibling Topics:

14.7.3.1 Choosing the type of index to generate for HTML

14.7.3.2 Specifying index file name and heading

14.7.3.3 Specifying CSS classes for index components

14.7.3.4 Including heading letters in the index