It it possible to implement in my wiki something like {{||MyTiddler!!some-field}} my tinkering shows no, and the docs don’t show how, while I’m sure it’s possible without using wikitext (for example using <$transclude>) I’m more so curious is it possible to do so in plain wikitext. Has it been done or should I see about just using <$transclude>?
Have you just tried {{MyTiddler!!some-field}}
, if it contains wiki text or other transclusions it should act on the current tiddler.
Here in tiddlywiki there are many ways to use a “template”, perhaps you can give an example.
Keep in mind the {{ }}
form of transclusion is only a shortcut form.
So we use the long form $transclusion to access the full set of features.
The general rule is:
{{MyTiddler||TemplateTitle}}
is a shortcut for:
<$tiddler tiddler="MyTiddler">
<$transclude $tiddler="TemplateTitle"/>
</$tiddler>
-
So the tiddler that should be rendered is defined using
<$tiddler tiddler="MyTiddler">
- which defines the
<<currentTiddler>>
variable.
- which defines the
-
The template to be used is
<$transclude $tiddler="TemplateTitle"/>
- So inside the template the
<<currentTiddler>>
variable can be used.
- So inside the template the
As Tony pointed out, {{||MyTiddler!!some-field}}
is a shortcut for
<$transclude $tiddler="template" $field="asdf-field" />
The currently active <<currentTiddler>>
variable is used. Which is defined by the ViewTemplate
I would say for that usecase the long-form is much more verbose and understandable as the shortcut.