When dealing with many parameters, I'm likely to setup a macro.

If things aren't too complicated, I much prefer transclusion and 
transclusion templates.

Why?  I can't explain it.  Macros annoy me for whatever reason.

Although a silly scenario, this sample code is about a little bit of 
filtering fun and to showcase how simple transclusion can be used for all 
sorts of things that are a little on the far side.

I've got a tiddler called "Some Tiddler" that has the text "Text in Some 
Tiddler"

I've got another tiddler with the following text:

{{Some Tiddler::red||tColouredText}}

{{Some Tiddler::green||tColouredText}}

{{Some Tiddler::blue||tColouredText}}

The template tiddler "tColouredText" has this text:

<$list filter="[<currentTiddler>!match[tColouredText]]">
<$vars thisTiddler={{{ [<currentTiddler>split[::]nth[1]] }}}
   thisColour={{{ [<currentTiddler>split[::]nth[2]else[black]] }}}>


<div style={{{ [[color:]addsuffix<thisColour>addsuffix[;]] }}}>
<$transclude tiddler=<<thisTiddler>>/>
</div>

</$vars>
</$list>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ff1d3c15-9a60-4e9e-9be8-cc020a0febccn%40googlegroups.com.

Reply via email to