Am 11.07.2015 um 07:26 schrieb Rustem:
I'd like to have a field in a template tiddler, and use it's value
when rendering a tiddler via the template. I know I can get
currentTiddler's fields, or any tiddler's fields using the title of
that tiddler. But is there a way to get template's fields without
referring to it by title literally?
Short answer: No
Long answer: Yes, the transclusion widget sets a variable called
"transclusion" that (aside some other things) also includes the name of
the template being used (I am guessing that it would in most cases). So
if you can write javascript, you may be able to devise a macro that
extracts the name of the template used that you would then be able to
use to get the template's fields. I can't think of any other way right now.
Of course, a better way of permanently making this sort of thing easier
would be to change the tiddler-widget to set an appropriate variable
containing that information. Maybe you can open a github issue about this ?
/Andreas
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/55A0CF6F.3000802%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.