[tw5] Some filtering fun

Over at TiddlyTalk, in the A list containing tiddlers with the same tags as current tiddler? thread, I had posted the following as my approach:

<$vars theseTags={{{ [tags[]sort[]join[,]] }}} >

<$list filter="[all[tiddlers]] :filter[tags[]sort[]join[,]match] +[!match]">
<$link/>
</$list>

</$vars>

That got me thinking: what if we wanted a list containing tiddlers with the same tags as current tiddler + 0-to-more tags ?

Say we also had Tiddler E with tags “topic a”, “topic aa” and “topic b”, and we wanted that to also be included when we look at Tiddler A?

Modified version of the code above:

<$vars theseTags={{{ [tags[]sort[]join[*]] }}} >

<$list filter="[all[tiddlers]] :filter[tags[]sort[]join[]regexp] +[!match]">
<$link/>
</$list>

</$vars>

Attached file has Tiddlers A-E, A being the one with the goodies. Download and drag into any TiddlyWiki (TiddlyWiki.com!)

TiddlersAtoE.json (1.14 KB)