You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The translink macro is exactly what's needed for many uses, but the shorthand <<translink>> doesn't conveniently work within list or tiddler widgets, because it fails to default to currentTiddler.
A second inconvenience is that translink, up until now, has not harnessed the cascade for display of the tiddler's body (in block mode).
(I do see that transclude, in general, does not do so. In my view, transclude has so many other purposes woven into the core, and it might create problems if transclude were modified so as to attempt, even in block mode, to harness the cascade. Translink, by contrast, is much more appropriate for cases where the intent is: "here's a framed copy of that tiddler, title and all".)
Describe the solution you'd like
I've written a workable replacement that has both of these features, plus recursive transclusion detection:
It can be invoked simply as <<translink>> within list widgets (etc.) defaulting to the currentTiddler.
It uses the cascade for block mode, as defined through $:/tags/ViewTemplateBodyFilter
It also triggers a "recursive transclusion" error if <<translink>> is accidentally invoked "raw", or otherwise ends up with its title parameter matching the storyTiddler enclosing it.
Describe alternatives you've considered
I can create long-form workarounds to behave as needed. But since most other macros and widgets allow a default to currentTiddler, this seems much more elegant and in keeping with user expectations.
Additional context
Below is a workable version of code which I propose as future contents of
Is your feature request related to a problem? Please describe.
The translink macro is exactly what's needed for many uses, but the shorthand
<<translink>>
doesn't conveniently work within list or tiddler widgets, because it fails to default to currentTiddler.A second inconvenience is that translink, up until now, has not harnessed the cascade for display of the tiddler's body (in block mode).
(I do see that transclude, in general, does not do so. In my view, transclude has so many other purposes woven into the core, and it might create problems if transclude were modified so as to attempt, even in block mode, to harness the cascade. Translink, by contrast, is much more appropriate for cases where the intent is: "here's a framed copy of that tiddler, title and all".)
Describe the solution you'd like
I've written a workable replacement that has both of these features, plus recursive transclusion detection:
<<translink>>
within list widgets (etc.) defaulting to the currentTiddler.<<translink>>
is accidentally invoked "raw", or otherwise ends up with its title parameter matching the storyTiddler enclosing it.Describe alternatives you've considered
I can create long-form workarounds to behave as needed. But since most other macros and widgets allow a default to currentTiddler, this seems much more elegant and in keeping with user expectations.
Additional context
Below is a workable version of code which I propose as future contents of
$:/core/macros/translink
The text was updated successfully, but these errors were encountered: