<div class="tc-table-of-contents">
<<toc-selective-single-expandable "Root" "sort[title]" exclude:"-[tag[Log]]-[field:visibility[hidden]]">>
</div><$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
<$reveal type="nomatch" state=<<toc-state>> text=<<currentTiddler>>>!tag[Log]!field:visbility[hidden]\define toc-selective-single-expandable(tag,sort:"",itemClassFilter,exclude,path)
<$vars tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" excluded="""$exclude$ -[[$tag$]]""" path="""$path$/$tag$""">
<ol class="tc-toc toc-selective-expandable">
<$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] -[[$tag$]] $exclude$""">
<$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<<toc-unlinked-selective-single-expandable-body tag:"""$(tag)$""" sort:"""$(sort)$""" itemClassFilter:"""$(itemClassFilter)$""" exclude:"""$(excluded)$""" path:"""$(path)$""">>>
<$macrocall $name=toc-unlinked-selective-single-expandable-body tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> path=<<path>> >
</$list>
</$list>
</ol>
</$vars>
\end
\define toc-linked-selective-single-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
<!-- helper function -->
<$set name="toc-state" value=<<qualify """$:/state/toc/$tag$""">>>
<$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>>
<$link>
<$reveal type="nomatch" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo=<<currentTiddler>> class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo="x-all-close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
<<toc-caption>>
</$link>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$macrocall $name="toc-selective-single-expandable" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
</$reveal>
</li>
</$set>
</$set>
\end
\define toc-unlinked-selective-single-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<$set name="toc-state" value=<<qualify """$:/state/toc/$tag$""">>>
<$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>>
<$list filter="[all[current]tagging[]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
<$reveal type="nomatch" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo=<<currentTiddler>> class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<<toc-caption>>
</$button>
</$reveal>
</$list>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$macrocall $name="""toc-selective-single-expandable""" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
</$reveal>
</li>
</$set>
</$set>
\end\define toc-linked-selective-single-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<$set name="toc-state" value=<<qualify """$:/state/toc/$tag$""">>>
<$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected" >
<li class=<<toc-item-class>>>
<$link>
<$list filter="[all[current]tagging[]!visibility[hidden]!tag[Log]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>">
<$reveal type="nomatch" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo=<<currentTiddler>> class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
</$button>
</$reveal>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo="x-all-close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
</$button>
</$reveal>
</$list>
<<toc-caption>>
</$link>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$macrocall $name="toc-selective-single-expandable" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
</$reveal>
</li>
</$set>
</$set>
\end
\define toc-unlinked-selective-single-expandable-body(tag,sort:"",itemClassFilter:" ",exclude,path)
<$set name="toc-state" value=<<qualify """$:/state/toc/$tag$""">>>
<$set name="toc-item-class" filter="""$itemClassFilter$""" emptyValue="toc-item" value="toc-item-selected">
<li class=<<toc-item-class>>>
<$list filter="[all[current]tagging[]!visibility[hidden]!tag[Log]limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>">
<$reveal type="nomatch" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo=<<currentTiddler>> class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}
<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$button set=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}
<<toc-caption>>
</$button>
</$reveal>
</$list>
<$reveal type="match" state=<<toc-state>> text=<<currentTiddler>>>
<$macrocall $name="""toc-selective-single-expandable""" tag=<<currentTiddler>> sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude="""$exclude$""" path="""$path$"""/>
</$reveal>
</li>
</$set>
</$set>
\end
\define toc-selective-single-expandable-empty-message()
<<toc-linked-selective-single-expandable-body tag:"""$(tag)$""" sort:"""$(sort)$""" itemClassFilter:"""$(itemClassFilter)$""" exclude:"""$(excluded)$""" path:"""$(path)$""">>
\end
\define toc-selective-single-expandable(tag,sort:"",itemClassFilter,exclude,path)
<$vars tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" excluded="""$exclude$ -[[$tag$]]""" path="""$path$/$tag$""">
<ol class="tc-toc toc-selective-expandable">
<$list filter="""[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] -[[$tag$]] $exclude$""">
<$list filter="[all[current]toc-link[no]]" variable="ignore" emptyMessage=<<toc-selective-single-expandable-empty-message>> >
<$macrocall $name=toc-unlinked-selective-expandable-body tag="""$tag$""" sort="""$sort$""" itemClassFilter="""$itemClassFilter$""" exclude=<<excluded>> path=<<path>> >
</$list>
</$list>
</ol>
</$vars>
\end"[all[current]has[caption]get[caption]] [all[current]!has[caption]get[title]] +[sort[]]""[all[current]has[caption]get[caption]] [all[current]!has[caption]get[title]] +[sort[]]"
<$list filter="[all[current]has[caption]get[caption]] [all[current]!has[caption]get[title]] +[reverse[]]"><div class="tc-table-of-contents"><<toc-selective-expandable "TableOfContents">></div></$list>