On Thursday, March 2, 2017 at 8:49:50 AM UTC-8, mauloop wrote:
>
> The (parametrized) transclusion I need stand within the body of two nested
> list widgets, that sets the tiddlers and the fields to be transluded, which
> in turns are concatenated using a wikitext macro. I pass variable to the
> macro using the syntax:
> {{$(currentTiddler)$!!$(field)$}}
> and everything works fine.
>
> But when I try to move all of this code into a a macro tiddler (tagged
> $:/tags/Macro) the $(currentTiddler)$ value is empty. Forcing the list
> widget with a non default variable name does not solve.
>
That's odd. *Within* a macro definition, the value of $(currentTiddler)$
is always defined. However, the $(...)$ syntax only works within the body
of the macro; so, *outside* a macro definition, $(currentTiddler)$ has no
defined value and is treated as literal text.
You said that "everything works fine" before you "moved all this code into
a macro tiddler". When you moved your code, did you retain the complete
macro definition, including everything from the "\define macroname(params)"
through "\end"?
I found that using <<currentTiddler>> instead of $(currentTiddler)$ works,
> but I cannot use this syntax within curly brackets.
>
Again, $(currentTiddler)$ only works within a macro, while
<<currentTiddler>> can be used either inside or outside a macro (but only
in certain syntax, as you've noted). This further suggests that your moved
macro code is no longer being defined properly.
If you post the complete contents of the macro tiddler, perhaps we could
see where things have gone wrong.
-e
Eric Shulman
TiddlyTools: Small Tools for Big Ideas (tm)
InsideTiddlyWiki: The Missing Manuals
--
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/9aa41a67-51fa-47c8-bc7b-73aefdbf1d78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.