On Sunday, January 31, 2016 at 9:11:21 AM UTC-8, Scott Simmons (Secret-HQ) wrote: > > On Sunday, January 31, 2016 at 1:25:50 AM UTC-5, Eric Shulman wrote: > > Have you tried: >> \define trans() {{||$(x)$}} >> <$list filter="[my[filter]]" variable="x"><<trans>></$list> >> * using variable="x" prevents the $list widget from changing the current >> tiddler context. >> * the trans() macro assembles the transclusion syntax using the current >> value of "x" >> > > I had hoped to avoid macros altogether (one less thing to remember about > an exceptional case if I transclude newhere buttons from time to time in > the future) — but that's a dead-brilliant workaround. I *had* considered > using Tobias's <$setvars> to build newhere buttons on the fly in a macro, > but your answer is *so much* more elegant. > > > >> Note: I thought that the <$transclude> widget had params for both >> tiddler="..." and template="...", so that template transclusion using >> variable params could be done without needing a macro to assemble the >> {{tiddler||template}} syntax... but it doesn't seem to be the case. >> > > There doesn't seem to be a "template" parameter — although it seems to > have been proposed a few times, given the number of times it crops up in > the archives of this Group. > > According to TiddlyWiki.com > <http://tiddlywiki.com/#Transclusion%20in%20WikiText> (and the thread here > <https://groups.google.com/forum/#!searchin/tiddlywiki/template$20transclusion/tiddlywiki/MdpJrIn3P1U/V-ljx6sW7GUJ>), > > I'd expect you to be able to use: > > <$tiddler tiddler=<<currentTiddler>> ><$transclude tiddler="MyButton" > /></$tiddler> > ... as the long-form version of {{||MyButton}}. > That works if you write it into a tiddler on its own, so perhaps there's > something about <$list> widget that throws a spanner into <$tiddler>? >
<$tiddler tiddler=<<currentTiddler>>> basically does nothing, since <<currentTiddler>> IS the current tiddler, the widget is setting the tiddler value to the *same* name and the behavior of the inner content (the $transclude) is not affected and still just performs a "simple" transclusion, rather than the template transclusion" that you want. -e -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/853bb2d6-e425-4486-9433-530c6b1475a1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.