mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-05 09:36:18 +00:00
36 lines
1014 B
Plaintext
36 lines
1014 B
Plaintext
title: TableOfContentsMacro
|
|
tags: macros
|
|
modified: 20140818180307785
|
|
|
|
The table of contents macro produces a hierarchical tree of tiddlers based on their tags.
|
|
|
|
The top level entries of the table of contents are defined by a root tag. The subentries under each of those entries are tagged with the title of the entry. Entries can be ordered using the `list` field as described in TiddlerTags.
|
|
|
|
There are several variants of the macro:
|
|
|
|
* `<<toc>>` produces a simple hierarchical tree of links
|
|
* `<<toc-expandable>>` produces an expandable tree of links
|
|
|
|
! Parameters
|
|
|
|
|!Position |!Name |!Description |!Default |
|
|
|1st |tag |The root tag that identifies the top level of the hierarchy | |
|
|
|
|
! Examples
|
|
|
|
!! Simple Table of Contents
|
|
|
|
<$macrocall $name="wikitext-example-without-html"
|
|
src="<div class='tw-table-of-contents'>
|
|
<<toc 'Contents'>>
|
|
</div>
|
|
"/>
|
|
|
|
!! Expandable Table of Contents
|
|
|
|
<$macrocall $name="wikitext-example-without-html"
|
|
src="<div class='tw-table-of-contents'>
|
|
<<toc-expandable 'Contents'>>
|
|
</div>
|
|
"/>
|