Say I click on “Connect to postgres db”. I would like to see this at the top of the tiddler:
Commands -> postgres -> Connect to postgres db (this)
Is there a recipe for doing that?
My second question is this: I would like to find all tiddlers that are not part of the TOC (because they haven’t been tagged correctly). What would that filter look like?
Here’s a specialized recursive “toc-list” macro that will give you a flat list of all titles contained in a given TOC, starting from a specified “root” tag value (e.g., “TableOfContents”):
\define toc-list(here,max,exclude,level:"1",field:"tags")
<!-- SHOW ALL TITLES AS FLAT LIST -->
<$list filter="""[contains:$field$[$here$]sortby{$here$!!list}] $exclude$ -[[$here$]]""">
<$text text="[["/><<currentTiddler>><$text text="]]"/><br>
<$reveal default="$level$" type="nomatch" text="$max$">
<$macrocall $name="toc-list" here=<<currentTiddler>> max="$max$" exclude="""$exclude$ -[[$here$]]""" level={{{ [[$level$]add[1]] }}} field=<<__field__>>/>
</$reveal>
</$list>
\end
To find all tiddlers that are NOT included in the TOC, you can write something like this:
The $wikify widget invokes the <<toc-list>> macro to get the flat list of tiddlers that ARE in the TOC (TOCtids). Then, the $list widget that follows it shows you a list of all tiddlers that are not in the TOCtids list.
Totally agree @Yaisog I was going to mention that myself, Nice to see they are plugins now. You really should dance like that monkey.
Unfortunately it does not directly solve the provision of a hierarchy and dealing with multiple parents as on the tiddlywiki.com TOC. Although I stand to be corrected.