title: $:/core/macros/toc tags: $:/tags/Macro \whitespace trim \procedure toc-viewField() <$let tv-wikilinks="no"> <$transclude $tiddler={{{ [!is[blank]thenelse] }}} $field={{{ [!is[blank]then[text]] :else[!is[blank]thenelse[caption]] }}} > <$view field="title"/> \end \procedure toc-open-icon() $:/core/images/down-arrow \procedure toc-closed-icon() $:/core/images/right-arrow \procedure toc-hide-field() toc-hide \procedure toc-include-field() toc-include \procedure toc-filter-field() toc-filter \function tf.toc-itemClassFilter() [get[text]matchthen[toc-item-selected]else[toc-item]] \function tf.toc-includeClass() [subfiltermatchthen[toc-item-include]] \function tf.toc-filterClass() [subfiltermatchthen[toc-item-filter]] \function tf.toc-hideClass() [!is[blank]then[toc-item-hide]] \function tf.toc-itemClass() [] [] [] [] +[join[ ]] \function tf.toc-getHideText() [get] \function tf.toc-hideIsYes() [format:titlelist[]] \function tf.toc-hide() [match[yes]then] :else[] \function tf.toc-include() [get] \function tf.toc-filter() [get] \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=<> exclude=<<_excluded>> path=<<_path>> />
  2. <% endif %>
\end \procedure toc(tag, sort:"", itemClassFilter, exclude, viewField, viewFieldTemplate) <$macrocall $name="toc-body" tag=<> sort=<> 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,viewField,viewFieldTemplate) <$qualify name="toc-state" title=<> >
  • >> <$link to={{{ [get[target]else] }}}> <> <> <% if [get[text]match[open]] %> <$macrocall $name="toc-expandable" tag=<> sort=<> exclude=<> path=<> viewField=<> viewFieldTemplate=<> /> <% endif %>
  • \end \procedure toc-unlinked-expandable-body(tag,sort:"",itemClassFilter,exclude,path,viewField,viewFieldTemplate) <$qualify name="toc-state" title=<>>
  • >> <> <% if [get[text]match[open]] %> <$macrocall $name="toc-expandable" tag=<> sort=<> exclude=<> path=<> viewField=<> viewFieldTemplate=<> /> <% endif %>
  • \end \procedure toc-expandable(tag,sort:"",itemClassFilter:"",exclude,path, viewField, viewFieldTemplate)
      <$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=<> exclude=<<_excluded>> path=<<_path>> viewField=<> viewFieldTemplate=<> /> <% else %> <$macrocall $name="toc-linked-expandable-body" tag=<> sort=<> exclude=<<_excluded>> path=<<_path>> viewField=<> viewFieldTemplate=<> /> <% endif %> <% endif %>
    \end \function tf.toc-curTidInclude() [get] \procedure toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path,viewField,viewFieldTemplate) <$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=<> exclude=<> path=<> viewField=<> viewFieldTemplate=<> /> <% endif %>
  • \end \procedure toc-unlinked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path,viewField,viewFieldTemplate) <$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=<> exclude=<> path=< viewField=<> viewFieldTemplate=<> /> <% endif %>
  • \end \procedure toc-selective-expandable(tag,sort:"",itemClassFilter,exclude,path,viewField,viewFieldTemplate)
      <$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=<> exclude=<<_excluded>> path=<<_path>> viewField=<> viewFieldTemplate=<> /> <% else %> <$macrocall $name="toc-linked-selective-expandable-body" tag=<> sort=<> exclude=<<_excluded>> path=<<_path>> viewField=<> viewFieldTemplate=<> /> <% endif %> <% endif %>
    \end \procedure toc-tabbed-external-nav(tag,sort:"",selectedTiddler:"$:/temp/toc/selectedTiddler",unselectedText,missingText,template:"",exclude, viewField, viewFieldTemplate) <$tiddler tiddler={{{ [get[text]] }}}>
    <$linkcatcher to=<>>
    <$macrocall $name="toc-selective-expandable" tag=<> sort=<> exclude=<> viewField=<> viewFieldTemplate=<> />
    <$reveal stateTitle=<> type="nomatch" text=""> <$transclude mode="block" tiddler=<