[TW5] How transclusion works?

93 views
Skip to first unread message

aSpex Daemon

unread,
Nov 11, 2013, 12:38:13 PM11/11/13
to tiddl...@googlegroups.com
Hi, all

I try to understand how transclusion works, so I performed some tests. You can see it here https://googledrive.com/host/0B0F9ptfqZXrQRTlXb2p0MnphQmM/tw5a14.transtest.html.
I marked rows 5,8,10,12,13 because it seems to me that the results should be different.
Does anyone else think that there is something wrong?

Jeremy Ruston

unread,
Nov 11, 2013, 5:30:59 PM11/11/13
to TiddlyWiki
Hi aSpex

Basically, in each of the cases you've highlighted the transclusion target is a field reference, with a separate template. When you use a template, the effect is that the template is rendered (not the target), but with the current tiddler variable set to the target tiddler. So, when you use a template, it's not meaningful to be able to set the current tiddler to a particular field or index. When you use a template, you should use a straight tiddler reference as the transclusion target.

Your table is incredibly helpful and has helped me spot a bug; in your cases 5, 8, 10, 12 and 13 the field modifier is incorrectly applied to the template, rather than the target. I've just committed a fix which will come out as alpha.15 in the next day or so.

The bigger bug, though, is that it shouldn't be possible to specify a field or index when using a template.

Best wishes

Jeremy






--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

aSpex Daemon

unread,
Nov 12, 2013, 10:53:11 AM11/12/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
Thanks for the detailed explanation. And happy to help.

Reply all
Reply to author
Forward
0 new messages