It seems this also works:

\define FilterTiddler() test-tiddler

<$set name="revealFilters" tiddler=<<FilterTiddler>> field=text
emptyValue="[!is[system]]">
<$list filter="[subfilter<revealFilters>match<currentTiddler>]">
<<currentTiddler>> is selected!!
</$list>
</$set>

Is there any simpler solution?

Best wishes
Mohammad


On Wed, Feb 24, 2021 at 10:20 AM Mohammad Rahmani <
[email protected]> wrote:

> I have a view template like below
>
> \define FilterTiddler() test-tiddler
>
> <$set name="revealFilters" tiddler=<<FilterTiddler>> field=text
> emptyValue="[!is[system]]">
> <$list
> filter="[all[current]subfilter<revealFilters>match<currentTiddler>]">
> <<currentTiddler>> is selected!!
> </$list>
> </$set>
>
>
>
> This template is used to show a message on a selected tiddler (those
> filtered through reavealFilters.
> Filter shall be able to
> 1. select only one tiddler e.g myTiddler
> 2. select tiddlers by tag e.g. [tag[myTag]]
> 3. select tiddlers by combination of criteria e.g. [tag[foo]] [tag[bar]]
> [prefix[New]]
>
> My question is: in the above code
> 1. the *subfilter *is a selection constructor. Why do we need all[current]
> in the filter?
> 2. What do you propose for the last part of the filter run? It seems the
> match<currentTiddler>  is slow?
> 3. What simpler solution do you propose?
>
>
>
> Best wishes
> Mohammad
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMCo4z6e28PNw5NhVa%2BXznTUfcvHMSZ4mQL6s522CaQhqQ%40mail.gmail.com.

Reply via email to