1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-20 00:34:50 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/macros/TableOfContentsMacro.tid
Jermolene 8cf726275c First pass at table of contents macros
Introduce macros for automatically generating table of contents
2014-08-18 20:52:36 +01:00

34 lines
776 B
Plaintext

title: TableOfContentsMacro
tags: macros
modified: 20140818180307785
The table of contents macro produces a hierarchical tree of tiddlers based on their tags.
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 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>
"/>