Saq,

Is the demand for a single filter expression a needed constraint?, because 
a filtered transclusion can be used to display the caption or title? Or am 
I missing something?

<$list filter="[tag[Widgets]]">
  <$link><$text text={{{ [all[current]get[caption]else[{!!title}]] 
}}}/></$link><br>
</$list>

Whilst we can squeeze more out of filters it is easy to overloads them, In 
my above list the list filter relates to the selection the filtered 
transclusion to the display of the item. They are distinct functions and 
need not be combined. 

Regards
Tones

On Tuesday, 15 June 2021 at 00:08:58 UTC+10 Saq Imtiaz wrote:

> I feel like there must be a very simple way to do this that I am missing.
>
> Given an ordered list of tiddler titles, in a *single filter expression*, 
> replace the title with the caption if there is one, else keep the title - 
> without changing the order.
>
> The only solution I came up with is convoluted (on pre-release):
>
> [tag[Widgets]] 
> :reduce[get[caption]else{!!title}format:titlelist[]addprefix[ 
> ]addprefix<accumulator>] +[enlist-input[]]
>
> where tag[Widgets] is a good stand-in for testing purposes for the 
> ordered list, as not all of these tiddler on 
> https://tiddlywiki.com/prerelease/ have captions but most do.
> Is there a simpler alternative?
>
> Cheers,
> Saq
>

-- 
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/307867f4-4730-44cf-80cc-521d68ad9e8cn%40googlegroups.com.

Reply via email to