This syntax is not correct because
!!levelis a field reference, but the actual level value was passed in as a macro parameter, so<<__level__>>(or<__level__>within filter syntax) would be the correct way to get the value.- To add 1 to a value, you need to use filter syntax with the
add[1]operator, like this:
level={{{ [<__level__>add[1]] }}}
Also, your recursion doesn’t protect against infinite loops. For example, if TiddlerB is tagged with TiddlerA, AND TiddlerA is tagged with TiddlerB, then you will get a tree like this:
TiddlerA
TiddlerB
TiddlerA
TiddlerB
... etc ...
With infinite recursion until the browser hangs or crashes with an “out of memory” error.
To address this, the TWCore TOC macros (as well as my TiddlyTools/TOC macros and @pmario’s TOCP macros) all use an “exclude” parameter that automatically keeps track of tree nodes that have already been “visited” on the current branch, so that they won’t be re-visited to prevent infinite loops.
-e