wiki:TracNav/Usage

Version 3 (modified by hauma, 15 years ago) (diff)

Typo.

TracNav Usage

To use TracNav, you have to create an index page for your site and call the TracNav macro on each page, where the navigation bar should be displayed.

Table of contents

The index page is a regular wiki page. This example uses the wiki page named TracNav/TOC to hold the table of contents for the TracNav documentation. The page with the table of contents must include an unordered list of links that should be displayed in the navigation bar.

Here is an example of such table of contents. Note: currently, only the [wiki:<Name> <Label] syntax is supported for links that should be displayed in the navigation bar.

 * [wiki:TracNav TracNav]
   * [wiki:TracNav Overview]
   * [wiki:TracNav/Install Install]
   * [wiki:TracNav/Usage Usage]
   * [wiki:TracNav/Download Download TracNav]
 * See also
   * [wiki:JavaParty JavaParty]
   * [wiki:KaRMI KaRMI]

Display the navigation bar

To display the navigation bar on a page, you must call the TracNav macro on that page and pass the name of your table of contents as argument. With this approach, you can create multiple separate table of contents on your site. By following the links in the "See also" section, you can explore the usage of TracNav on the JavaParty home page.

In this example, the following macro call is used to bring the table of contents stored in TracNav/TOC to this page. Place such macro invocation somewhere at the head of your wiki page.

[[TracNav(TracNav/TOC)]]