Create breadcrumbs

Hi, I’m curious to see if there’s a solution for displaying breadcrumbs based on a TOC. I’m attaching a portion of my “home page”.

image

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?

See: Suggested Breadcrumbs Macros for TW Docs

@pmario, @EricShulman: any suggestions for this? I could use it too.

To create breadcrumbs you bead a Local Occluded Active Filter (LOAF).

<\pun>

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:

<$wikify name="TOCtids" text=<<toc-list "TableOfContents">>>
<$list filter="[all[tiddlers]!enlist<TOCtids>]"><<currentTiddler>><br></$list>

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.

For more TOC goodies, see TiddlyTools/TOC and TiddlyTools/TOC/ItemTemplate

enjoy,
-e

2 Likes

For a tag-based TOC, you could also use the taggingtree[] filter that is discussed here
https://talk.tiddlywiki.org/t/recursive-filter-operators-to-show-all-tiddlers-beneath-a-tag-and-all-tags-above-a-tiddler/3814
and available as a plugin here: https://yaisog.tiddlyhost.com/

Similar to Eric’s solution, you’d use it like this:

<$list filter="[all[tiddlers]] :not[[TableOfContents]taggingtree[]]"><<currentTiddler>><br></$list>

Have a nice day
Yaisog

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.

I am researching now.