List of tiddlers in multiple list fields

79 views
Skip to first unread message

Michael Gentry

unread,
Sep 26, 2019, 12:01:43 PM9/26/19
to TiddlyWiki
I'm trying to work out a filter that will take in a list of tiddlers as input, and output a list of all tiddlers that are listed in all of the input's list fields. To basically, if you had this:

Tiddler1!!list = TiddlerA TiddlerD Tiddler F
Tiddler2!!list = TiddlerE
Tiddler3!!list = TiddlerB TiddlerC

...you could then do this:

Tiddler1 Tiddler2 Tiddler3 --> MAGIC FILTER --> TiddlerA TiddlerD TiddlerF TiddlerE TiddlerB TiddlerC

I realize that I could accomplish something similar by using nested $lists, but I'd like to get it squeezed into one filter so that I can sort the output.

Any ideas?

Riz

unread,
Sep 26, 2019, 12:17:58 PM9/26/19
to tiddl...@googlegroups.com
Have you tried

<$list filter="[list[Tiddler 1]] [list[Tiddler 2]] [list[Tiddler 3]]">

Sincerely,
Riz

Aidan Grey

unread,
Sep 26, 2019, 12:59:26 PM9/26/19
to tiddl...@googlegroups.com
And then add "+[sort[title]]" or however you want to sort.

On Thu, Sep 26, 2019, 10:18 AM Riz, <madapeed...@gmail.com> wrote:
Have you tried

<$list filter="[list[Tiddler A]] [list[Tiddler B]] [list[Tiddler C]]">

Sincerely,
Riz

--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ad3b58fe-d328-4070-9acc-a2c6ed5110dc%40googlegroups.com.

Mark S.

unread,
Sep 26, 2019, 1:09:41 PM9/26/19
to TiddlyWiki
This would not have been possible just a couple versions ago. Now, I think, you can use:

<$list filter="tiddler1 tiddler2 tiddler3 +[each:list-item[list]sort[]] ">

</$list>

Michael Gentry

unread,
Sep 26, 2019, 1:39:26 PM9/26/19
to TiddlyWiki
Sure, except that the input list might vary. (I should have made that more clear in my example.) I'm trying to figure out something that can be generalized, like so:

[arbitrary filter output in title-list form] --> !!MAGIC FILTER!! --> [contents of list fields of each of the tiddlers on the left side, in title-list form]

Michael Gentry

unread,
Sep 26, 2019, 3:21:50 PM9/26/19
to TiddlyWiki
This finally did the trick:

<$set name="myList" filter="[some filter here]" >

<$list '[enlist<myList>each:list-item[list]]' />

</$set>
Reply all
Reply to author
Forward
0 new messages