With the new 5.3.0 features I have a hunch here may be even more elegant ways;
I just started to investigate and first considered if you don’t want the links, just text a simple join is sufficient; However this led to some insight.
<$text text={{{ [all[current]backlinks[]] +[join[, ]] }}}/>
However then I remembered, if you display a list of existing titles, with the core Freelinks plugin, they will become active links. So using the same method as above, with freelinks;
<$text text={{{ [tag[TableOfContents]limit[5]] +[join[, ]] }}}/>
You could even add a period, with this method.
<$text text={{{ [tag[TableOfContents]limit[5]] +[join[, ]addsuffix[.]] }}}/>
So now using this method the following is also valid;
<$text text=`${ [tag[TableOfContents]limit[5]] +[join[, ]addsuffix[.]] }$`/>
But further research may come up with methods that do not need the freelinks plugin.
- I will post in this reply if I come up with more.
[Edit 1] Using the Freelinks plugin you can simplify this to;
<$text text=`${ [tag[TableOfContents]limit[5]] +[join[, ]addsuffix[.]] }$`/>
“Filtered transclusions” also work for earlier than 5.3.0
<$text text={{{ [tag[TableOfContents]limit[5]] +[join[, ]addsuffix[.]] }}}/>
Alternatively in 5.3.x you can move it to a custom filter operator
\function comma.list() [join[, ]addsuffix[.]]
<$text text={{{ [tag[TableOfContents]limit[5]] +[comma.list[]] }}}/>
- I can see moving this into a custom widget, which I have not yet mastered.
<$commalist filter="[all[current]backlinks[]]"/>
A Final example that uses the custom filter operator but not the Freelinks plugin is as follows; but note you can avoid the custom operator to make it compatible with pre TW 5.3.0, you could also move it into a macro.
\function comma.list2() [join[,|]addsuffix[.]]
\function comma.delist2() [all[current]trim[,]trim[.]]
<$list filter="[tag[TableOfContents]limit[5]] +[comma.list2[]] +[split[|]]">
<$link to={{{ [comma.delist2[]] }}} ><$text text=<<currentTiddler>>/></$link>
</$list>
- Notice the use of
|
as a item delimiter
I would vote for the following with the freelinks plugin;
\function comma.list() [join[, ]addsuffix[.]]
<$text text={{{ [tag[TableOfContents]limit[5]] +[comma.list[]] }}}/>
I will stop for now until I get some feedback