> Alternately, what would the correct way to call config.macros.tiddler be,
> to give it the "with" parameter as in calling from a transclusion?
Take a look a the definition of config.macros.tiddler.handler()...
specifically, the last few lines:
-----------------
var wrapper = createTiddlyElement(place,"span",null,className,null,{
refresh: "content", tiddler: tiddlerName
});
if(args!==undefined)
wrapper.setAttribute("args","[["+args.join("]] [[")+"]]");
this.transclude(wrapper,tiddlerName,args);
-----------------
Basically, given a tiddlerName (text), and args (array of text), this
code creates a span, sets the "refresh", "tiddler", and "args"
attributes, and then invokes config.macros.tiddler.transclude(...) to
perform the substitution pre-processing and rendering of the resulting
content.
Note that the 'args' attribute that is stored in the wrapper is
converted from an array into a space-separated "bracketed list". This
is used later on during automatic refresh handling. If you omit
automatic refresh handling, you can even skip most of the above code,
and write a "oneliner"... something like this:
config.macros.tiddler.transclude(place,"TiddlerName",
["arg1","arg2","arg3"])
where 'place' is the DOM element you want to render into. If you are
using
http://www.TiddlyTools.com/#InlineJavascriptPlugin
then 'place' is automatically defined for you, so all you need to do
is enclose the above line of code inside <script>...</script> and
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.