70 | | |
| 70 | |
| 71 | == Trac Hack: Table of Content == |
| 72 | The TocMacro generates a table of contents for the current page or a set of pages. |
| 73 | |
| 74 | If no arguments are given, a table of contents is generated for the current page, with the top-level title stripped: |
| 75 | |
| 76 | {{{ |
| 77 | [[TOC]] |
| 78 | }}} |
| 79 | [[TOC]] |
| 80 | To generate a table of contents for a set of pages, simply pass them as comma separated arguments to the TOC macro. This is the macro call for the table of contents visible on the right side of this page: |
| 81 | |
| 82 | {{{ |
| 83 | [[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, TracAdmin, TracBackup, TracLogging, |
| 84 | TracPermissions, TracWiki, WikiFormatting, TracBrowser, TracRoadmap, TracChangeset, |
| 85 | TracTickets, TracReports, TracQuery, TracTimeline, TracRss, TracNotification)]] |
| 86 | }}} |
| 87 | |
| 88 | The following ''control'' arguments change the default behaviour of the TOC macro[[FootNote(Supported from [22])]]: |
| 89 | |
| 90 | || '''Argument''' || '''Meaning''' || |
| 91 | || {{{heading=<x>}}} || Override the default heading of "Table of Contents" || |
| 92 | || {{{noheading}}} || Suppress display of the heading. || |
| 93 | || {{{depth=<n>}}} || Display headings of ''subsequent'' pages to a maximum depth of '''<n>'''. || |
| 94 | || {{{inline}}} || Display TOC inline rather than as a side-bar. || |
| 95 | || {{{titleindex}}}[[FootNote(Supported since [37])]] || Only display the page name and title of each page, similar to TitleIndex. || |
| 96 | |
| 97 | |
| 98 | |