Bluey?

Here is a complete TOC recursive pair of macros if you feel like building 
your own, This one will traverse the whole tree, but not display those that 
match the filter.

\define each-level(filter)
<$list filter="$filter$" variable=nul>
[[$(currentTiddler)$]]<br>
</$list>
<$list filter="[is[current]tagging[]]">
        <<each-level $filter$>>
</$list>
\end
\define list-toc(tiddlername filter)
<h2>Top of TOC</h2>
<$tiddler tiddler="$tiddlername$">
   <$list filter="[is[current]tagging[]]">
       <<each-level $filter$>>
   </$list>
</$tiddler>
\end

<<list-toc TableOfContents "[is[current]!tag[hide]]">>
there is no indenting each level in this

As stated before you cant have a tree of untagged tiddlers, if that tree is 
defined by tags, However you could have a tree defined by using another 
field such as the parent field, the advantage also being you can force only 
one parent.

\define each-child(filter)
[[$(currentTiddler)$]]<br>
<$list filter="[parent[$(currentTiddler)$]]">
        <<each-child $filter$>>
</$list>
\end
\define list-tocP(tiddlername)
<$tiddler tiddler="$tiddlername$">
   [[$tiddlername$]]<br>
   <$list filter="[parent[$tiddlername$]]">
       <<each-child>>
   </$list>
</$tiddler>
\end

<<list-tocP "New Home">>

This can be facilitated using marios TOCP 
plugin https://wikilabs.github.io/editions/tocP/

Back to the tag based TOC, I did asked myself why you may want untagged 
tiddlers in a tree, and realising the normal approach is that children are 
tagged with the parent I realised even the lowest "leaf" on a tag tree has 
a tag, you will not find even those at the bottom free of tags. However If 
the TOC finds a tiddler that no other tiddler uses as a tag, then it will 
be a leaf. I may use this to identify leaves.

For my above examples I am looking for an easy method to indent each level.

Best wishes 
Tony


On Friday, 15 February 2019 23:42:36 UTC+11, TonyM wrote:
>
> Blue,
>
> Can I suggest you look into learning how to make your own set of recursive 
> macros to do what the toc macro does? You can research how the existing 
> ones work or possibly search for posts of mine on this previously. If you 
> can find it let me know.
>
> The fact is you can do anything you want in a to if you build it yourself.
>
> Regards
> Tony
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/69ac0be4-8bac-4553-ba0f-40cfb054406d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to