#### 29.3.7 Considering an example of browse navigation

Suppose your project involves a DITA document named TechGuide.book that consists of three files: Intro.fm, Examples.fm, and Summary.fm; and suppose you want Prev and Next links at the top of each HTML file generated from TechGuide.book.

In the [Inserts] section of the configuration file you would specify where on each page of HTML output the links should appear (see §29.3.6 Specifying where to invoke a browse macro). For Examples, at the top of each HTML page:

    [Inserts]
    Top = <$_prev><br /><br /><$_next>

Suppose DITA2Go splits the files in TechGuide.book as follows (see §27.3 Splitting files):

    Intro.fm:  Intro.htm  aa100002.htm  aa100003.htm
    Examples.fm:  Examples.htm  bb200002.htm  bb200003.htm  bb200004.htm
    Summary.fm:  Summary.htm  cc300002.htm

Figure 29-1 shows the positions of these files with respect to the differences in default definitions of <$_prev> and <$_next> (see Table 29-3).

Figure 29-1 Positions of files in TechGuide.book

Table 29-8 Values of variables in navigation links for TechGuide.book

HTML file | <$_prev> | <$_next>
<$$_prevfile> | <$$_prevtitle> | <$$_nextfile> | <$$_nexttitle>
    Intro.htm
| None (no link) | At Start |
    aa100002.htm
| Intro section 2 title
    aa100002.htm
    Intro.htm
| Introduction |
    aa100003.htm
| Intro section 3 title
    aa100003.htm
    aa100002.htm
| Intro section 2 title |
    Examples.htm
| Brilliant examples and exposition
    Examples.htm
    Intro.htm
| Introduction |
    bb200002.htm
| Examples section 2 title
    bb200002.htm
    Examples.htm
| Brilliant examples and exposition |
    bb200003.htm
| Examples section 3 title
    bb200003.htm
    bb200002.htm
| Examples section 2 title |
    bb200004.htm
| Examples section 4 title
    bb200004.htm
    bb200003.htm
| Examples section 3 title |
    Summary.htm
| Conclusion
    Summary.htm
    Examples.htm
| Brilliant examples and exposition |
    cc300002.htm
| Summary section 2 title
    cc300002.htm
    Summary.htm
| Conclusion | None (no link) | At End

Table 29-8 shows the values that <$_prev> and <$_next> macros would use in each HTML file; in particular:

- For the very first and very last files, the default definitions of <$_prev> and <$_next> do not include links, but only predefined text for titles.
- For all other files, the title is that used in the HTML <title> element, and usually comes from a paragraph or a DITA PI marker, as determined by settings described in §27.5.2 Specifying page titles for split or extract files.

Previous Topic: 29.3.6 Specifying where to invoke a browse macro

Next Topic: 30. Mapping text formats to HTML/XML

Parent Topic: 29.3 Creating a browse sequence

Sibling Topics:

29.3.1 Understanding how browse macros work

29.3.2 Choosing buttons versus text links for a browse sequence

29.3.3 Formatting browse-link labels

29.3.4 Modifying macros <$_prev>, <$_next>, and <$_top>

29.3.5 Understanding browse keyword scope and default values

29.3.6 Specifying where to invoke a browse macro