This page is part of a static HTML representation of the TiddlyWiki at https://tiddlywiki.com/

Variable Attribute Values

 26th July 2023 at 3:10pm

Variable attribute values are indicated with double angle brackets around a macro invocation. For example:

<div title=<<MyMacro "Brian">>>
...
</div>

The behaviour of variables invoked via widget attributes is not the same as when they are invoked via normal wikitext. In addition, the behaviour depends on how the variable is declared:

how declaredbehaviour
\defineTextual substitution of parameters is performed on the body text. No further processing takes place. The result after textual substitution is used as the attribute's value
$set, $let, $vars, \procedure, \widgetBody text is retrieved as-is and used as the attribute's value.
\functionWhen a function is invoked as <div class=<<macro>>/>, it is a synonym for <div class={{{[function[macro]]}}}/>. As with any filtered transclusion (i.e. triple curly braces), all results except the first are discarded. That first result is used as the attribute's value. Note that functions are recursively processed even when invoked in this form. In other words a filter expression in a function can invoke another function and the processing will continue