Using Matt Lauber's Aliases plugin and displaying aliases as part of the current tiddler

My twgroceries install has lots of food, vegetables, and other tiddlers that might have names in different languages, regions, or other ways of referring to the same thing.

I ended up picking Matt Lauber’s Aliases plugin to solve this for me.

The main usage is by adding an aliases field to any tiddler, and typing in the aliases that you want to have also link to this current tiddler. From the plugin demo site, here’s a George Lucas tiddler, which has Mr. Lucas and Star Wars Director listed as aliases:

You can have more than one tiddler with the same alias, in which case you’ll get a disambiguation tiddler that looks like this:

I don’t really see myself using this multiple aliases feature, but wanted to show it for completeness.

My next step was to add a view template to display the aliases for the current tiddler. Here’s the code I came up with, in a tiddler named Aliases Header on my wiki:

<$list filter='[is[current]has[aliases]]' variable=dummy>
<div style="padding: 5px 0px 7px 20px">aka {{!!aliases}}</div>
</$list>

I added a field list-after containing this $:/core/ui/ViewTemplate/title – in order to have it display after the tiddler title / before the tag pills.

Here’s an example for my entry for shisito pepper:

The alias entries are just listed with spaces between them. You can see how they are entered when I display the info for the same tiddler:

I’ll probably also use it for mundane things, like a carrot entry that has carrots as an alias.

Other uses:

  • linking to people or organizations – e.g. You might make boris an alias for Boris Mann in a personal CRM
  • abbreviations / acronyms, so a tiddler like Downtown East Side has DTES as an alias

Caveats:

  • Backlinks aren’t registered for alias links. So, if you have a carrot tiddler, but use carrots to link to it as an alias, any tiddlers that use the [[carrots]] link, won’t show up in the backlinks for carrot

Thank you to @EricShulman for sailing in with solutions to my two improvement items:

<$list filter='[<currentTiddler>has[aliases]]' variable=dummy>
<div style="padding: 5px 0px 7px 20px">aka <$text text={{{ [enlist{!!aliases}join[, ]] }}}/></div>
</$list>

I’d like to list the aliases with commas in between them:

{{{ [enlist{!!aliases}join[, ]] }}}

I’d like to suppress linking. If the alias is entered [[With Square Brackets]] it gets linkified…but it just links to the current tiddler you’re already looking at, which isn’t useful:

<$text text=.../>

2 Likes
<$list filter='[<currentTiddler>has[aliases]]' variable=dummy>
<div style="padding: 5px 0px 7px 20px">aka <$text text={{{ [enlist{!!aliases}join[, ]] }}}/></div>
</$list>
  • aliases as plain text: <$text text=.../>
  • aliases comma separated: {{{ [enlist{!!aliases}join[, ]] }}}

enjoy,
-e

Hi boris,
My uni-link plugin also uses an aliases field, but the whole concept has a slightly different focus.

See: uni-link — extended link functions There is a video, which show the functions.

Important: uni-link plugin and Matt’s plugin should not be used at the same time. They are probably not compatible to each other.

Thanks @pmario. I think I had seen your plugin before, but I didn’t want to have to change how I linked things.

Thank you so much Eric! Plugged this in above as an edit to showcase the solution!

Hi there,

I haven’t used the Aliases plugin yet, but I like what you’ve done and may just try it… Thanks for sharing your ideas and for the other useful bits others contributed.

I am a big fan of the Edit-CompText plugin because of the context menu that pops up, in edit mode, when typing the [[ hot keys followed by a few characters…

This modification of the plugin’s $:/plugins/snowgoon88/edit-comptext/configtiddler ensures that both matching aliases and tiddler titles show up, which speeds up editing, with whatever alias first comes to mind when typing.

  "template": [{
      "pattern": "[[",
      "filter": "[all[tiddlers]!is[system]] [has[aliases]get[aliases]enlist-input[]]",
      "start": "[[",
      "end": "]]"
      },

Cheers!

3 Likes

Oh yeah! This is great. Definitely adding this to my setup. Thank you for sharing!