It’s been a while since I’ve been able to mess with this. Maybe you can help me, I see where the history is looked at:
\define toc-item()
\whitespace trim
<$tiddler tiddler=<<item>>>
@@.tt-toc-item <nobr>
<$reveal state=<<toc-open-all>> type="nomatch" text="yes"><<toc-toggle-branch>></$reveal>
<$transclude tiddler=<<toc-template>>/> <!-- item template extras -->
<$button class={{{ [[tc-btn-invisible ]] [[tt-toc-button]] [{$:/HistoryList!!current-tiddler}match<item>then[-selected]] +[join[]] }}}
style="outline:none;" to=<<currentTiddler>> tooltip=<<item>>><<toc-caption>> <$list filter="[<item>has[draft.of]]">(draft)</$list></$button>
<$list filter="[{$:/HistoryList!!current-tiddler}match<item>]"><div style="height:0;width:0;visibility:hidden;"><$scrollhere/></div></$list>
<div style="clear:both;"/>
\end
And I THINK I see where the branch item is being toggled:
\define toc-show-if-parent(here,exclude)
<!-- AUTO SHOW BRANCH IF IT CONTAINS CURRENT TIDDLER -->
<$list filter="[<__here__>!match<item>]" emptyMessage="<<toc-show-branch>>">
<$list filter="""[[$here$]get<field>enlist-input[]] -[subfilter<__exclude__>] -[[$here$]]""">
<$macrocall $name="toc-show-if-parent" here=<<currentTiddler>> exclude="""$exclude$ [[$here$]]"""/>
</$list>
</$list>
\end
\define toc-toggle-branch()
\whitespace trim
<span class="tt-toc-toggle" style="display:inline-block;width:1.2em;">
<$list filter=<<toc-item-is-branch>> emptyMessage=" ">
<$reveal state=<<toc-branch-is-open>> type="match" text="open">
<$button class="tc-btn-invisible" tooltip="collapse this item"> {{$:/core/images/down-arrow}}
<$action-setfield $tiddler=<<toc-config>> $index="""$(path)$/$(item)$"""/>
</$button>
</$reveal>
<$reveal state=<<toc-branch-is-open>> type="nomatch" text="open">
<$button class="tc-btn-invisible" tooltip="expand this item"> {{$:/core/images/right-arrow}}
<$action-setfield $tiddler=<<toc-config>> $index="""$(path)$/$(item)$""" $value="open"/>
</$button>
</$reveal>
</$list>
</span>
\end
There are a lot of cool features in there (Expand all/Collapse all, Drag and Drop etc) that make it tough to identify JUST the folder toggle. I’ve tried tweaking things here and there, to see what would happen - It breaks lol
I would like to maybe just have a toggle that says if you’re collapsing a folder, by clicking on the arrow, just ignore the current history - expand the branch stuff. Otherwise, do what it currently does.
Thank you!