[tw5] A way to create links that work regardless of uppercase/lowercase

In this case, creating a button widget looking like a link, which opens a tiddler in a modal.

The tiddler title is all uppercase (PRINT), but I’ve got a code sample that has the word in lowercase, and I rather like the lowercase in the sample code.

So the sample BASIC code has:


The tKwm tiddler’s text:

<$button tooltip={{{ [addprefix[Lookup ]] }}} class=“tc-btn-invisible keyword”><$action-sendmessage
$param={{{ [!is[missing]] [uppercase[]!is[missing]] +[first[]] }}}
template=“Keyword Viewer” />{{!!title}}</$button>

So if the “current tiddler” matches as-is a tiddler that exists, then use that. Otherwise, use the uppercase version of “current tiddler”.

To dig into things, go to my BASIC Anywhere Machine Programmer’s Reference TiddlyWiki and find the SWAP statement tiddler via the keywords reference menu item.