I know @saqimtiaz recently posted some warning about filtered transclusions in some widget but I cannot locate it. Maybe this is a double of that information, or maybe it is new, or maybe I just misunderstand something, but the following does not work and I don’t understand why:
<$text text={{{ a b }}} />
I was expecting the output to be a b but the output is only a
Filtered attribute values are indicated with triple curly braces around a Filter Expression. The value will be the first item in the resulting list, or the empty string if the list is empty.
This example shows how to add a prefix to a value:
Thanks @Charlie_Veniot - but this (obviously) joins the items into one… so what is your idea that I would do with that output? Besides, couldn’t I just have used the input a::b then?
With that said, if join[::] is replaced with just join[ ] then it is basically what Saq suggests.
That to me is a rather odd mental model and probably worth revisiting. I cannot honestly see anything in common between triple quotes and triple braces.
Triple quotes are for the exceptional situation where you need to pass a literal string as an attribute which itself contains quotes. Their need in macros should already be diminished if not eliminated by the <__paramname__> syntax for accessing macro parameters.
If you know ahead of time, such that you can “hard code” the tiddler titles, then you can certainly manually join them in a list by typing each tiddler title out individually.
The reason for the join is so that whatever is before it, however complicated a filter that yields however many tiddler titles, they will all get strung up into one item.
The reason for the “::” in the join is to make it ridiculously easy to “split” that item into the multiple titles if needed. (EDIT: i.e. make the join-string-of-characters something that will likely never actually be part of a tiddler title, or part of whatever list of items is generated by the filter, because the filter could be getting something other than titles. So maybe “:::” would be better, or an emoji of some kind, like “”)
All setup for generic usage (i.e. pretty much any kind of use case one could think of for that one item that actually contains many.