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>?

Maybe this is a bug that merits a GitHub ticket?

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bbee4c3a-1a98-456f-a817-79964debb6b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to