title: $:/core/macros/toc tags: $:/tags/Macro \whitespace trim \procedure toc-caption() <$let name="tv-wikilinks" value="no"> <$transclude field="caption"> <$view field="title"/> \end \procedure toc-open-icon() $:/core/images/down-arrow \procedure toc-closed-icon() $:/core/images/right-arrow \function tf.toc-itemClassFilter() [get[text]matchthen[toc-item-selected]else[toc-item]] \function tf.toc-includedClass() [subfiltermatchthen[toc-item-include]] \function tf.toc-filteredClass() [subfiltermatchthen[toc-item-filter]] \function tf.toc-hideClass() [!is[blank]then[toc-item-hide]] \function tf.toc-itemClass() [] [] [] [] +[join[ ]] \function tf.toc-getHideText() [get[toc-hide]] \function tf.toc-hideIsYes() [format:titlelist[]] \function tf.toc-hide() [match[yes]then] :else[] \function tf.toc-include() [get[toc-include]] \function tf.toc-filter() [get[toc-filter]] \function tf.toc-newPath() [addsuffix[/]addsuffix] \procedure toc-body(tag,sort:"",itemClassFilter,exclude,path)
    <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] [subfilter] -[] -[subfilter]`> <%if [] -[subfilter] %> <$let item=<> __path=<> > <$set name="__excluded" filter="[subfilter] [] [subfilter]">
  1. >> <% if [all[current]toc-link[no]] %> <> <% else %> <$link to={{{ [get[target]else] }}}> <> <% endif %> <$macrocall $name="toc-body" tag=<> sort=<> itemClassFilter=<> exclude=<<__excluded>> path=<<__path>> />
  2. <% endif %>
\end \procedure toc(tag,sort:"",itemClassFilter:"",exclude) <$macrocall $name="toc-body" tag=<> sort=<> itemClassFilter=<> exclude=<>/> \end \procedure toc-item(isUnlinked:"") <% if [get[text]else[close]match[close]] %> <$button setTitle=<> setTo="open" class="tc-btn-invisible tc-popup-keep" tooltip=<>> <$transclude tiddler=<> /> <% if [match[yes]] %> <> <% endif %> <% elseif [get[text]match[open]] %> <$button setTitle=<> setTo="close" class="tc-btn-invisible tc-popup-keep" tooltip=<>> <$transclude tiddler=<> /> <% if [match[yes]] %> <> <% endif %> <% endif %> \end \function tf.toc-stateTitle() [[$:/state/toc]] [] "/" [] +[join[]] \procedure toc-linked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<> >
  • >> <$link to={{{ [get[target]else] }}}> <> <> <% if [get[text]match[open]] %> <$macrocall $name="toc-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> /> <% endif %>
  • \end \procedure toc-unlinked-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<>>
  • >> <> <% if [get[text]match[open]] %> <$macrocall $name="toc-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> /> <% endif %>
  • \end \procedure toc-expandable(tag,sort:"",itemClassFilter:"",exclude,path)
      <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] [subfilter] -[] -[subfilter]`> <%if [] -[subfilter] %> <$let __path=<>> <$set name="__excluded" filter="[subfilter] [] [subfilter]"> <% if [all[current]toc-link[no]] %> <$macrocall $name="toc-unlinked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<<__excluded>> path=<<__path>> /> <% else %> <$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<<__excluded>> path=<<__path>> /> <% endif %> <% endif %>
    \end \function tf.toc-curTidInclude() [get[toc-include]] \procedure toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<>>
  • >> <$link to={{{ [get[target]else] }}}> <% if [all[current]tagging[]] [subfilter] -[subfilter] +[limit[1]] %> <> <% else %> <$button class='tc-btn-invisible'> {{$:/core/images/blank}} <% endif %> <> <% if [get[text]match[open]] %> <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> /> <% endif %>
  • \end \procedure toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path) <$qualify name="toc-state" title=<> >
  • >> <% if [all[current]tagging[]] [subfilter] -[subfilter] +[limit[1]] %> <> <% else %> <$button class="tc-btn-invisible"> {{$:/core/images/blank}} <> <% endif %> <% if [get[text]match[open]] %> <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter=<> exclude=<> path=<> /> <% endif %>
  • \end \procedure toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path)
      <$list filter=` [subfilter] :else[all[shadows+tiddlers]tag!has[draft.of]$(sort)$] [subfilter] -[] -[subfilter]`> <%if [] -[subfilter] %> <$let __path=<>> <$set name="__excluded" filter="[subfilter] [] [subfilter]"> <% if [all[current]toc-link[no]] %> <$macrocall $name="toc-unlinked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<<__excluded>> path=<<__path>> /> <% else %> <$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> itemClassFilter=<> exclude=<<__excluded>> path=<<__path>> /> <% endif %> <% endif %>
    \end \procedure toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"",exclude) <$tiddler tiddler={{{ [get[text]] }}}>
    <$linkcatcher to=<>>
    <$macrocall $name="toc-selective-expandable" tag=<> sort=<> itemClassFilter="[all[current]] -[get[text]]" exclude=<> />
    <$reveal stateTitle=<> type="nomatch" text=""> <$transclude mode="block" tiddler=<