I have a macro that outputs a tree of tiddlers, but it only works when invoked from the “root node” tiddler. If I put it in a tiddler with a different name, there is no tree. Basically, the parameter is ignored, it just picks up the current tiddler’s title and goes from there.
I spent all day trying to make it work from any tiddler, to no avail. I looked at the “toc” macros, but wasn’t able to adapt them. I just need a simple tree. I cannot use one of the “toc” macros - unlike “toc”, mine doesn’t go into infinite recursion when a tiddler is tagged with itself.
Please help! Thanks!
\define tree_macro(node)
;[[$node$]]
:<$list filter="[<currentTiddler>tagging[]!<currentTiddler>]">
<$macrocall $name=tree_macro node={{!!title}}/>
</$list>
\end
-R.
I have a macro that outputs a tree of tiddlers, but it only works when invoked from the “root node” tiddler. If I put it in a tiddler with a different name, there is no tree. Basically, the parameter is ignored, it just picks up the current tiddler’s title and goes from there.
Please help! Thanks!
\define tree_macro(node) ;[[$node$]] :<$list filter="[<currentTiddler>tagging[]!<currentTiddler>]"> <$macrocall $name=tree_macro node={{!!title}}/> </$list> \end
\define tree_macro(node)
<$tiddler tiddler="$node$">
;[[$node$]]
:<$list filter="[<currentTiddler>tagging[]!<currentTiddler>]">
<$macrocall $name=tree_macro node={{!!title}}/>
</$list>
</$tiddler>
\end