[tw5] A way of creating Wikipedia article links

(Because I find myself referring to many articles in a TiddlyWiki instance.)

Transclusion goodness:

{{Primitive_data_type||tWm}}

So passing the (Wikipedia, mobile) article part of the URL to the tiddler template “tWm”.

There is no tiddler named “Primitive_data_type”. This is just a way to give “tWm” some text.

The “tWm” tiddler text:

^^<a href={{{ [[https://en.m.wikipedia.org/wiki/]addsuffix] }}} style=“text-decoration:none;font-family:Times New Roman” target="_blank">W^^

Same kind of thing could be done with a macro if you prefer macros.

1 Like

I was going to create a post about this and totally forgot that I had already done that.

Here is the “tWm” template tiddler, which I’ve modified just a little bit to show a tooltip:

Drag attached to tiddlywiki.com .

For any Wikipedia article, you just want the part of the url that has the article name, so for

https://en.wikipedia.org/wiki/Primitive_data_type, you’ll setup the transclusion as {{Primitive_data_type||tWm}}

tWm.json (460 Bytes)

1 Like

I’ve since added a second kind of Wikipedia link to handle the two ways I use them.

Two template tiddlers in the attached file.

Usage example:

Screenshot 2023-07-05 11.29.54 PM.png

WikipediaLinksTiddlerTemplates.json (871 Bytes)

2 Likes

And then, for the giggles: