My tiddler now looks like this:
\procedure linkDisplay(title, subfilter)
<<title>>:
<ul>
<$list filter="[all[current]subfilter<subfilter>]">
<li><$link /></li>
</$list>
</ul>
\end
<<linkDisplay "Links" "[links[]]">>
<<linkDisplay "Backlinks" "[backlinks[]]">>
subfilter
runs the complete filter expression in its parameter with subfilter
's input tiddlers as the input tiddlers of the new expression.
You wouldn't have to use subfilter
here if you didn't want to. You could use a macro with text substitution instead of a procedure and directly add links[]
or backlinks[]
into the filter expression, or you could just repeat all[current]
in both filters; that would hardly be a horrible amount of repetition.