Hello TiddlyWiki Community,
I am working on a setup where a tiddler that uses a template tagged with $:/tags/ViewTemplate
automatically displays a link to the corresponding template for easy editing.
My Current Setup
-
Template Example:
$:/tags/ViewTemplate/tagsVIDEO
- Template Content:
<% if [all[current]tag[VIDEO]] %>
<% if [all[current]has[resolution]] %>
resolution: {{!!resolution}}
<% endif %>
[[EDIT THE TEMPLATE|$:/tags/ViewTemplate/tagsVIDEO]]
<% endif %>
This works well when the link is hardcoded for a specific template, like $:/tags/ViewTemplate/tagsVIDEO
.
The Problem
I have multiple templates (e.g., $:/tags/ViewTemplate/tagsAUDIO
, $:/tags/ViewTemplate/tagsIMAGE
), and I want to dynamically generate the link to the template that is being used for each tiddler.
For instance, if a tiddler has the AUDIO
tag, the link should automatically point to $:/tags/ViewTemplate/tagsAUDIO
.
However, I don’t know how to retrieve the title of the template being used dynamically.
What I Need Help With
- How can I dynamically retrieve the title of the template being used in a tiddler and display it as a clickable link?
- Is there a best practice for linking back to templates in such setups?
Any advice or examples would be greatly appreciated!
Thank you in advance for your help.