##### 29.3.4.2 Redefining button browse macros

When UseNavButtons=Yes, you can redefine browse macros for buttons by changing the code assigned to the keywords listed in this section.

Do not try to duplicate <$_prev> and <$_next> logic by using the predefined macro variable components outside of the definitions for <$_prev> and <$_next>. The browse sequence would fail on inter-file links, because you would be missing some critical internal code that is required to handle such links.

Note: In your configuration file each code assignment must be all on one line, even if it does not look that way here.

To redefine macros for buttons that activate links between the HTML files split from a DITA file, change the following default definitions:

    [NavigationMacros]
    UseNavButtons = Yes
    ; PrevButton = content to put out for <$_prev>
    PrevButton = <button type="button"
      onclick="javascript:location.href='<$$_prevfile>'">
      <$$_prevtitle></button>
    ; NextButton = content to put out for <$_next>
    NextButton = <button type="button"
      onclick="javascript:location.href='<$$_nextfile>'">
      <$$_nexttitle></button>

For a previous button in the first and a next button in the last HTML file in the entire sequence, change the following default definitions:

    [NavigationMacros]
    UseNavButtons = Yes
    ; StartingPrevFSButton = <$_prev> to use at start of first file
    ; in book
    StartingPrevFSButton = <button type="button">
      <$$_seqstarttitle></button>
    ; EndingNextFSButton = <$_next> to use at end of last file in book
    EndingNextFSButton = <button type="button">
      <$$_seqendtitle></button>

For a button link to the top of the current page, change the following default definition:

    [NavigationMacros]
    UseNavButtons = Yes
    ; TopButton = content to put out for <$_top>,
    ; link to top of current file
    TopButton = <button type="button"
      onclick="javascript:location.href='<$$_currfile>'">
      <$$_toptitle></button>

To provide label formatting (for example):

    [NavigationMacros]
    UseNavButtons = Yes
    PrevButton = <button type="button"
      onclick="javascript:location.href='<$$_prevfile>'">
      <p class="navcell">Prev</p></button>

To provide different text for the (non-link) very first and very last buttons, or no text at all:

    [NavigationMacros]
    UseNavButtons = Yes
    StartingFSButton =
    EndingFSButton = <b>Stop!</b>

Typing nothing (or only a single space) after the equals sign results in a null value.

Previous Topic: 29.3.4.1 Redefining text-link browse macros

Next Topic: 29.3.5 Understanding browse keyword scope and default values

Parent Topic: 29.3.4 Modifying macros <$_prev>, <$_next>, and <$_top>

Sibling Topics:

29.3.4.1 Redefining text-link browse macros

Table of Contents • Index