There are several ways to do this :
With filters
You can use a filter in the url, something like this could work :
https://groktiddlywiki.com/read/#:[{id!!10}]
In the tiddler id
, create a field “10” or whatever else and put the name of the tiddler you want to link inside. This way you can create shorter links.
Other examples that all point to the same tiddler:
Using filters, I can transform your link from this :
https://groktiddlywiki.com/read/#Requirements%20for%20the%20Sample%20Wiki
to this :
https://groktiddlywiki.com/read/#:[all[shadows]search:title[Requirements]]
With templates
If you dont want to use filters, you can create a custom missing tiddler template, or a custom Story Tiddler Template Filter.
E.g :
In a tiddler with the tag $:/tags/StoryTiddlerTemplateFilter
and the field list-before
:
[{!!title}is[missing]prefix[/]then[RedirectTemplate]]
Then in RedirectTemplate
:
\define close()<$action-sendmessage $message="tm-close-tiddler" $param=<<redirect-title>> />
\define edit()<$action-sendmessage $message="tm-edit-tiddler" $param=<<currentTiddler>> /><<close>>
\define delete()<$action-sendmessage $message="tm-delete-tiddler" $param=<<currentTiddler>> /><<close>>
<$let redirect-title={{!!title}}>
<$tiddler tiddler={{{ [{!!title}removeprefix[/]]:map[all[tiddlers]article{!!title}] }}} >
<$messagecatcher $tm-close-tiddler=<<close>> $tm-edit-tiddler=<<edit>> $tm-delete-tiddler=<<delete>>>
<$transclude tiddler="$:/core/ui/ViewTemplate"/>
</$messagecatcher>
</$tiddler>
</$let>
That way I can link to my tiddler using its article field, without using a filter in the url:
https://demos.tiddlyhost.com/#/a-long-title-made-shorter
redirect.json (1.0 KB)
Using your idea (probably the best solution)
The neat thing about your idea is that the permalink button works, there is no need for using a message catcher widget, only the title needs to be modified. I already made a template for that :
Caption_instead_of_title_with_character_formatting.json (594 Bytes)
You can use the caption field as your “ugly” title, and the title will be used to set the permalink.
Demo : https://demos.tiddlyhost.com/#short-link