[[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, TracAdmin, TracBackup, TracLogging, TracPermissions, TracWiki, WikiFormatting, TracBrowser, TracRoadmap, TracChangeset, TracTickets, TracReports, TracQuery, TracTimeline, TracRss, TracNotification)]] = Table of Contents Macro = == Description == The TocMacro generates a table of contents for the current page or a set of pages. If no arguments are given, a table of contents is generated for the current page, with the top-level title stripped: {{{ [[TOC]] }}} 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: {{{ [[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, TracAdmin, TracBackup, TracLogging, TracPermissions, TracWiki, WikiFormatting, TracBrowser, TracRoadmap, TracChangeset, TracTickets, TracReports, TracQuery, TracTimeline, TracRss, TracNotification)]] }}} The following ''control'' arguments change the default behaviour of the TOC macro[[FootNote(Supported from [22])]]: || '''Argument''' || '''Meaning''' || || {{{heading=}}} || Override the default heading of "Table of Contents" || || {{{noheading}}} || Suppress display of the heading. || || {{{depth=}}} || Display headings of ''subsequent'' pages to a maximum depth of ''''''. || || {{{inline}}} || Display TOC inline rather than as a side-bar. || || {{{titleindex}}}[[FootNote(Supported since [37])]] || Only display the page name and title of each page, similar to TitleIndex. || [[FootNote]] == Bugs/Feature Requests == Existing bugs and feature requests for TocMacro are [report:9?COMPONENT=TocMacro here]. If you have any issues, create a [http://trac-hacks.swapoff.org/newticket?component=TocMacro&owner=athomas new ticket]. == Download == [source:tocmacro/0.8 TocMacro for 0.8].[[BR]] [source:tocmacro/0.9 TocMacro for 0.9]. TocMacro requires that AnchorPatch be applied to [wiki:0.8] Trac. Trac [wiki:0.9] already includes this patch. == Source == You can check out the source for TocMacro from Subversion at http://trac-hacks.swapoff.org/svn/tocmacro. == Example == {{{ [[TOC(inline, heading=Trac Table of Contents, TracGuide, TracInstall, depth=2, TracLogging, depth=99, TracPermissions)]] }}} On the right you can see the TOC macro version of the default !TracGuideToc macro. == Author/Contributors == '''Author:''' [wiki:athomas athomas] [[BR]] '''Contributors:''' Thanks to Michel Jouvin for the {{{titleindex}}} changes, as well as the new default behaviour of stripping the top-level titles. Very nice. [[TagIt(macro,athomas,0.8,0.9)]]