This might be an incredibly stupid question, but it’s been driving me crazy for the past hour or so.
Let’s say I have a tiddler with a field called links
, containing a list of tiddler titles like so: [[Tiddler1]] [[SomeOtherTiddler]] [[Another tiddler with spaces]]
and I’d like to list those links in bullet point format. TW makes this really easy, just use:
<<list-links filter:"[{!!links}enlist-input[]sort[]]">>
And it works as you’d expect.
But now, let’s say I want to have those links be external rather than tiddler titles, and let’s say that (because these links are quite long), I’d like to have them shortened. Trying to use the standard notation that you would use in wikitext, i.e.: [[shortlink|https://some-super-long-link-somewhere.com/]]
, hasn’t worked at all. enlist
and enlist-input
always assume a tiddler title and output a link to shortlink|https://some-super-long-link-somewhere.com/
.
So this makes me wonder: How do I make this work? How can I, given a list of links in a field, such as:
[[link1|https://somelinkijustcameupwith.c/]] [[second link|https://www.somewhereelse.c/]]
Transform it into:
Somehow, this seems like it should be so easy, and yet I can’t get it working. I’ve tried various filters and searched online to no avail. I have been thinking of simply creating the list of links via html in the field itself, but I don’t really like this, as I prefer to keep my fields as pure information repositories, and leave any kind of formatting or display decisions to the tiddlers / templates that actually use that information.