> ... the ShowImage thing...
That 'thing' is called a 'transclusion'... like an inline script (or a
plugin-defined macro), transclusions can be used generate program-
driven output, embedded in specific tiddler content.
Transclusions are invoked by using the
<<tiddler TiddlerName with: param param param ...>>
syntax. The 'param' values are automatically inserted in place of any
'substitution markers' ("$1" through "$9") that are embedded in the
transcluded content. This allows you to use the transclusion as if it
was a macro function: passing in parameter values and generating
enhanced output in response.
Some transclusions are simple substitutions, allowing you to use an
abbreviated syntax to render pre-formatted blocks of content, like
this:
<<tiddler ShowQuotation with: [[...quote...]] [[author]]>>
where ShowQuotation contains:
$2 wrote:
{{{
$1
}}}
Transclusions can do much more than simply insert a few values into a
pre-defined format. By using a combination of 'hidden sections' and
some cleverly written 'evaluated parameters' invoked from the
<<tiddler>> macro, it is possible to build some complex programmed
behaviors into a transcluded tiddler.
However, while macros and inline scripts can use virtually any
javascript coded logic you can imagine, transclusions only contain
standard TW syntax, without relying upon installation of any
supporting plugins (i.e., InlineJavascriptPlugin). Although this
limits their abilities somewhat, there are still a wide variety of
programmatically-generated output and/or behaviors that they can
produce.
In fact, when possible, I have been converting many of my previously
written TiddlyTools inline scripts into 'transclusions', in order to
completely eliminate their dependence on InlineJavascriptPlugin. By
using only TW native syntax, it allows these former scripts to work
properly and consistently, regardless of whether they are installed in
an empty TW document or one that has been highly customized with lots
of plugins.
For the current listing of 'transclusions' available on TiddlyTools,
see:
http://www.TiddlyTools.com#txtCatalogTab:transclusions
enjoy,
-e
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en
-~----------~----~----~----~------~----~------~--~---