If that tiddler exists in the wiki, then the link should be a regular tiddlylink.
If the tiddler is missing then it should be an external url to where that tiddler can be found.
The following works, calling it with
\define link() {{{ [<__url__>split[#]rest[]decodeuri[]join[ ]] }}}
\define linkOrExt(url)
<$list filter="""$url$ +[split[#]rest[]decodeuri[]join[ ]is[missing]]""" emptyMessage=<<link>>> <a href="""$url$""" rel="noopener noreferrer" target="_blank">{{!!title}}</a>
</$list>
\end
...but I am hoping for something more elegant that doesn't need the extra macro. And it seems silly I have to do the splitting twice. Maybe something with then or else can be used but I can't fully wrap my head around these operators. (I wish the else op could somehow enclose a full expression directly in the filter: "...else<this separate filter>" )
Note: Trying to avoid the extra macro by doing:
emptyMessage={{{ [<__url__>split[#]rest[]decodeuri[]join[ ]] }}}
...returns a textified title, but it needs to be a link.
Ideas anyone?
<:-)