I frequently link to another tiddler in my wiki having a particularly long name. Currently I'm using the [[text|tiddler_name]]
syntax. I'd like to replace tiddler_name
with an abbreviated version or shortcut rather than the full name, to make it more convenient to use. How to do that?
How to make abbreviated links to other tiddlers?
482 Views Asked by MathManM At
2
There are 2 best solutions below
0

I came across this question by accident, but if you're still looking for solutions, Tobias Beer has a macro that I've been using for years that allows you to define multiple case-insensitive alt links using the following code.
\define a:target()
<$list filter="[regexp:alink<regexp>limit[1]]"><$link><<target>></$link></$list>
\end
\define a:(target)
<$set name="regexp" value="\|$target$\|(?i)"><$set name="target" value="$target$"><<a:target>></$set></$set>
\end
\define alink(target)
<<a: "$target$">>
\end
https://tobibeer.github.io/tb5/#Alias%20Links
After adding the plugin to your wiki, just add a field named alink
to the tiddler and put |text|
as the value. You can then type <<a: text>>
instead of [[tiddler_name]]
.
Be aware that alink values should be lowercase and if you use something with spaces like |your text|
, you'll need to reference it as <<a: [[your text]]>>
You cannot use the
[[|]]
syntax for that. You can define a new macro using the link widget as follows.I assumed that you use the field
caption
to store a shorter name of a tiddler. Put the above code into a tiddler and tag the tiddler with$:/tags/Macro
. To put a link using this macro, useBasically, the macro filters all tiddlers that have the
caption=short_name
. So if there are two tiddlers having the samecaption
, two links will be displayed.