First, create a tiddler called WikipediaMetadata
and set its url
field to https://en.wikipedia.org/wiki/
. (You could also make a tiddler containing only the URL, in the text
field, and create other tiddlers if you needed to maintain other information about Wikipedia; it's up to you.)
Then in WikipediaLinkTemplate
:
<a class="tc-tiddlylink-external" href={{{ [{WikipediaMetadata!!url}addsuffix<articleName>] }}}><<articleName>></a>
And to use this tiddler:
<$let articleName="Aardvark">
{{WikipediaLinkTemplate}}
</$let>
Notice that treating the WikipediaLinkTemplate
as a template by placing ||
prior to its name in the transclusion is not necessary, as it does not access any of the fields of the current tiddler.