Thanks for the reply, but, um, does that mean I'll have to learn how to write JavaScript in order to do simple transclusion with parameters in TW5.x?
This are the first 2 paragraphs.
A macro is a named snippet of text. WikiText can use the name as a shorthand way of transcluding the snippet. Such transclusions are known as macro calls, and each call can supply a different set of parameters that get substituted for special placeholders within the snippet.
For the syntax, see Macros in WikiText.
What do widgets have to do with any of it?
Sorry, what seemed to be a standard and simple technique is ending up in the "too hard basket". Why would a core functionality in a previous version no longer be available in the update?
If we have to learn to write JavaScript to use it, then is it really even a wiki still?
Inside a list, you might frequently transclude the contents of tiddlers that have been selected by the "filter" parameter of the <$list> widget. The output fields from those tiddlers might be modified by a template tiddler.
\define tiddler(title,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
<$set name="$1" value="$arg1$">
<$set name="$2" value="$arg2$">
<$set name="$3" value="$arg3$">
<$set name="$4" value="$arg4$">
<$set name="$5" value="$arg5$">
<$set name="$6" value="$arg6$">
<$set name="$7" value="$arg7$">
<$set name="$8" value="$arg8$">
<$set name="$9" value="$arg9$">
{{||$title$}}
</$set>
</$set>
</$set>
</$set>
</$set>
</$set>
</$set>
</$set>
</$set>
\end
Thus, in TWC you write:<<tiddler NameOfTiddler with: arg1 arg2 arg3 ...>>while in modern TW you write:<$vars var1="arg1" var2="arg2" var3="arg3" ...>{{NameOfTiddler}}</$vars>
Thus, in TWC you write:
<<tiddler NameOfTiddler with: arg1 arg2 arg3 ...>>while in modern TW you write:<$vars var1="arg1" var2="arg2" var3="arg3" ...>{{NameOfTiddler}}</$vars>
On Monday, September 14, 2015 at 7:26:24 AM UTC+12, Eric Shulman wrote:Thus, in TWC you write:<<tiddler NameOfTiddler with: arg1 arg2 arg3 ...>>while in modern TW you write:<$vars var1="arg1" var2="arg2" var3="arg3" ...>{{NameOfTiddler}}</$vars>
As a practice, I have created a template tiddler to apply CSS formatting to a single variable {{!!cons-text}} which is then invoked from an example tiddler using Eric's example of the <$vars>..</$vars> block. For some reason my transclusion works fine, but the parameter isn't parsed.
<span style="display: inline-block; border: 2px solid black; background-color: black; color: GhostWhite; font-family: FixedSys, Terminal, monospace; width:90%;">~$ <<cons-text>> </span>