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$]] $exclude$"""> <$vars item=<> path="""$path$/$tag$""" excluded="""$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:" ") <> \end \define toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected">
  • >> <$link> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> 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) <$set name="toc-state" value=<>> <$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected">
  • >> <$reveal type="nomatch" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="toc-expandable" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
  • \end \define toc-expandable-empty-message() <> \end \define toc-expandable(tag,sort:"",itemClassFilter:" ",exclude,path) <$vars tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" excluded="""$exclude$ -[[$tag$]]""" path="""$path$/$tag$""">
      <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] -[[$tag$]] $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) <$set name="toc-state" value=<>> <$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" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> 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) <$set name="toc-state" value=<>> <$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" state=<> text="open"> <$button set=<> setTo="open" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/right-arrow}} <> <$reveal type="match" state=<> text="open"> <$button set=<> setTo="close" class="tc-btn-invisible tc-popup-keep"> {{$:/core/images/down-arrow}} <> <$reveal type="match" state=<> text="open"> <$macrocall $name="""toc-selective-expandable""" tag=<> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
  • \end \define toc-selective-expandable-empty-message() <> \end \define toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path) <$vars tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" excluded="""$exclude$ -[[$tag$]]""" path="""$path$/$tag$""">
      <$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] -[[$tag$]] $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-selected-item-filter(selectedTiddler) [all[current]field:title{$selectedTiddler$}] \end \define toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"") <$tiddler tiddler={{$selectedTiddler$}}>
    <$linkcatcher to="$selectedTiddler$">
    <$macrocall $name="toc-selective-expandable" tag="""$tag$""" sort="""$sort$""" itemClassFilter=<>/>
    <$reveal state="""$selectedTiddler$""" type="nomatch" text=""> <$transclude mode="block" tiddler="$template$">

    <>

    <$transclude mode="block">$missingText$ <$reveal state="""$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