I am exploring the power of templates in tiddlywiki. Please consider this
{{||template}}
{{tiddlername||template}}
In the tiddler "template" the value of current Tiddler will be that of the currenttiddler in the first example and tiddlername in the second example.
However in the following cases
{{!!fieldname||template}}
{{tiddlername!!fieldname||template}}
Is there a way in the template tiddler for me to get the name of the fieldname?
Thanks in advance
Tony
{{!!fieldname||template}}{{tiddlername!!fieldname||template}}
Is there a way in the template tiddler for me to get the name of the fieldname?
thanks for the feedback. I am actually working on the button actions hackability we have discussed elsewhere. There seems a Great way to combine both our ideas.
With your answer above Does that mean I must know the fieldname and set it to a variable, so that I can access the variable inside the template?
I was wondering if template was transcluded by a random transclusion e.g. {{name!!field||template}} if we can extract the "field". Or will it only transclude name!!field?
I ask because if I used {{name||template}}, inside the template the currentTiddler=name, so I can get the name, I am wondering about getting the "field".
Regards
Tony
<$list filter="[<currentTiddler>] -[[test]] -[[Draft of 'test']]">
<$set name=mytid filter="[<currentTiddler>split[--]]" select=0 >
<$set name=myfield filter="[<currentTiddler>split[--]]" select=1 >
<$tiddler tiddler=<<mytid>>>
<$set name=test field=<<myfield>> tiddler=<<mytid>> >
I see <<test>>.
</$set>
</$tiddler>
</$set>
</$set>
</$list>actions={{$:/core/ui/Buttons/close||$:/tags}}\define codeTiddler() $:/core/ui/Buttons/closeThat is correct. The following work of course
{{tiddlername!!fieldname}}
{{tiddlername}}
{{||template}}
{{tiddlername||template}}
The format of the transclusion is more detailed than that. I am just not sure if the documentation covers this adequately.
I may try and find where the {{||template}} is handled in the core.
Thanks
Tony