Hi again, Kev,

well, transclusion has little to do with programming. Its some weird 
TiddlyWiki lingo. I actually have no clue about the origin of this notion 
but what I do know is that it simply means to use the <<tiddler>> macro to *
include* or *embed* one tiddler into another while being able to pass some 
substitution parameters, e.g....

*[[Tiddler Example]]*
Render me [[SomeTemplate]] with some custom content...
<<tiddler SomeTemplate with: custom content>>

...whereas like with other macros "custom" and "content" would be the 
parameters or "variables" passed down to the template for substitution as...

$1 = custom
$2 = content

If this were the actual template tiddler...

*[[SomeTemplate]] *
I like //$1// ''$2''!

Then the actual output for [[TiddlerExample]] would be...
Render me *SomeTemplate* with some custom content...
I like *custom* *content*!

This is a very powerful concept for content reuse and templating. If your 
template actually did some Javascript magic, then you would have your own 
little programm, e.g...

*[[MagicTemplate]]*
<html><span onclick="alert('$1');">Click me for a magic message... 
</span></html>

or...

*[[MultiMacroTemplate]]*
The tag macro output for [[$1]]...
<<tag [[$1]]>>

The list macro output for [[$1]]...
<<list filter [tag[$1]]>>

Cheers, Tobias.

-- 
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 http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to