#### 29.2.3 Specifying what to include in trails of links

In the usual case, you can set MakeTrail=Yes and SplitTrail=Yes, and appropriate trails of links will appear in the HTML output for headings assigned format properties Split, Trail, and Title. Other settings allow you to override DITA2Go defaults for what to include in trails and where to position trails.

Content of trail entries

To include in the trails of links the content of a heading format (or other format, for extracted files), assign both the Title property and the Trail property to that format. For example:

    [HTMLParaStyles]
    ;  Trail, if [Trails]MakeTrail=Yes, causes the <$_trail> to be put out
    ;   as specified by [Trails] settings.
    ChapTitle=Title Trail
    FigCaption=ExtrStart Title Trail

Heading prefix or suffix

To provide a prefix or suffix for heading content as it appears in trails:

    [StyleTrailPrefix]
    ; doc style = prefix to use (if any) for file title in trails
    HeadFmt=prefix

    [StyleTrailSuffix]
    ; doc style = suffix to use (if any) for file title in trails
    HeadFmt=suffix

The heading content displayed in a trail excludes any prefix or suffix values assigned to heading formats via [StyleTitlePrefix] or [StyleTitleSuffix] (see §27.5.2.3 Specifying a title prefix or suffix).

Code to start, end, separate entries

You can specify the HTML starting, ending, and separator code for the trail. For example:

    [Trails]
    ; TrailStart = starting code for <$_trail>
    TrailStart=<p><em>
    ; TrailSep = code between <$_trail> elements
    TrailSep=&nbsp;&gt;&nbsp;
    ; TrailEnd = ending code for <$_trail>
    TrailEnd=</em></p>
    ; TrailLinkClass = value for class attribute in trail links,
    ;  default is none
    ;TrailLinkClass=trlink

You can use TrailStart to put a class attribute on the <p> tag, and use CSS to style it, if the regular italic form (from <em>) does not suffice. And you can add a class attribute for the links used in trails.

Stack trail entries

If the text of your headings tends to be lengthy, you might want to put each item in a trail of links on a separate line, instead of having them all on one line; and you might want to indent each successive entry.

To stack trail entries, replace the final &nbsp; of the TrailSep value with <br>.

To indent successive stacked entries incrementally, specify the number of spaces to indent; the maximum is four spaces per level:

    [Trails]
    ; TrailIndent = number of &nbsp;s to put after TrailSep for each
    ;  output line to create indentation; a value of 1 puts one space
    ;  before the second line, two before the third, three before
    ;  the fourth, etc.  A value of 2 puts 2, 4, 6, etc.  Zero disables.
    ;  If a value over 4 is set, it is reduced to 4.
    TrailIndent=2

Current heading

By default, a trail consists of links to headings above the current page. It can also include, as text rather than as a link, the heading (or other first paragraph) of the current page, as the final item in the trail:

    [Trails]
    ; TrailCurrent = Yes (default), No, or Always
    TrailCurrent=Yes

TrailCurrent can have the following values:

Yes | Include the current-page heading only when the trail already contains at least one item; otherwise omit the trail. This is the default.
No | Never include the current-page heading in the trail.
Always | Always include the current-page heading, even if it is the only item in the trail.

You would specify TrailCurrent=Always if, for example, you had embedded another link in TrailStart, perhaps to the table of contents.

Previous Topic: 29.2.2 Specifying whether to include trails of links

Next Topic: 29.2.4 Specifying heading levels for trails of links

Parent Topic: 29.2 Generating trails of links

Sibling Topics:

29.2.1 Understanding trails of links

29.2.2 Specifying whether to include trails of links

29.2.4 Specifying heading levels for trails of links

29.2.5 Specifying where to display trails of links