Opps [all[current]get[caption]else{!!title}] On Tuesday, 15 June 2021 at 09:00:25 UTC+10 TW Tones wrote:
> 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 tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/08d5a866-168d-4742-8f33-2d47dea4fa21n%40googlegroups.com.