title: $:/core/macros/toc tags: $:/tags/Macro \define toc-caption() <$set name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> \end \define toc-body(tag,sort:"",itemClassFilter,exclude,path)
    <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]"""> <$vars item=<> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}> <$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]"""> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  1. >> <$list filter="[all[current]toc-link[no]]" emptyMessage="<$link><$view field='caption'><$view field='title'/>"> <> <$macrocall $name="toc-body" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<> path=<>/>
\end \define toc(tag,sort:"",itemClassFilter:" ") <$macrocall $name="toc-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> /> \end \define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> <$link> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <$reveal type="match" stateTitle=<> text="open"> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • \end \define toc-unlinked-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • \end \define toc-expandable-empty-message() <$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> \end \define toc-expandable(tag,sort:"",itemClassFilter:" ",exclude,path) <$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}> <$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
      <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]"""> <$list filter="[all[current]toc-link[no]]" emptyMessage=<> > <$macrocall $name="toc-unlinked-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="""itemClassFilter""" exclude=<> path=<> />
    \end \define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected" >
  • >> <$link> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}"> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <$reveal type="match" stateTitle=<> text="open"> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • \end \define toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path) <$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix] }}}> <$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item" value="toc-item-selected">
  • >> <$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <$view field='caption'><$view field='title'/>"> <$reveal type="nomatch" stateTitle=<> text="open"> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" stateTitle=<> text="open"> <$macrocall $name="toc-selective-expandable" tag=<> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
  • \end \define toc-selective-expandable-empty-message() <$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<>/> \end \define toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path) <$vars tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}}> <$set name="excluded" filter="""[enlist<__exclude__>] [<__tag__>]""">
      <$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]"""> <$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<> > <$macrocall $name="toc-unlinked-selective-expandable-body" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<> path=<>/>
    \end \define toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"") <$tiddler tiddler={{{ [<__selectedTiddler__>get[text]] }}}>
    <$linkcatcher to=<<__selectedTiddler__>>>
    <$macrocall $name="toc-selective-expandable" tag=<<__tag__>> sort=<<__sort__>> itemClassFilter="[all[current]field:title<__selectedTiddler__>]"/>
    <$reveal stateTitle=<<__selectedTiddler__>> type="nomatch" text=""> <$transclude mode="block" tiddler=<<__template__>>>

    <>

    <$transclude mode="block">$missingText$ <$reveal stateTitle=<<__selectedTiddler__>> type="match" text=""> $unselectedText$
    \end \define toc-tabbed-internal-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"") <$linkcatcher to=<<__selectedTiddler__>>> <$macrocall $name="toc-tabbed-external-nav" tag=<<__tag__>> sort=<<__sort__>> selectedTiddler=<<__selectedTiddler__>> unselectedText=<<__unselectedText__>> missingText=<<__missingText__>> template=<<__template__>>/> \end