2021년 10월 23일 오후 4:24
Introduction
The setmultiplevariables widget assigns values to multiple variables where the names and values of the variables are specified as separate filter.
Content and Attributes
The content of the <$setmultiplevariables>
widget is the scope for the value assigned to the variable.
Attribute | Description |
---|---|
$names | Filter evaluating to the names of a list of variables to assign |
$values | Filter evaluating to the values corresponding to the list of names specified in $names |
Examples
Here is an example of a convoluted way to display the values of the fields of the tiddler "HelloThere":
<$setmultiplevariables $names="[[HelloThere]fields[]addprefix[demo-]]" $values="[[HelloThere]fields[]] :map[[HelloThere]get<currentTiddler>]">
<ol>
<$list filter="[variables[]prefix[demo-]sort[]]">
<li>
''<$text text={{{ [<currentTiddler>removeprefix[demo-]] }}}/>'': <$text text={{{ [<currentTiddler>getvariable[]] }}}/>
</li>
</$list>
</ol>
</$setmultiplevariables>
That renders as:
- created: 20130822170200000
- icon: $:/core/icon
- list: [[A Gentle Guide to TiddlyWiki]] [[Discover TiddlyWiki]] [[Some of the things you can do with TiddlyWiki]] [[Ten reasons to switch to TiddlyWiki]] Examples [[What happened to the original TiddlyWiki?]]
- modified: 20241115170824144
- tags: Welcome
- text: !!.tc-hero-heading ''Welcome to TiddlyWiki, a unique [[non-linear|Philosophy of Tiddlers]] notebook for [[capturing|Creating and editing tiddlers]], [[organising|Structuring TiddlyWiki]] and [[sharing|Sharing your tiddlers with others]] complex information'' Use it to keep your [[to-do list|TaskManagementExample]], to plan an [[essay or novel|"TiddlyWiki for Scholars" by Alberto Molina]], or to organise your wedding. Record every thought that crosses your brain, or build a flexible and responsive website. * ~TiddlyWiki lets you choose where to keep your data, guaranteeing that in the decades to come you will [[still be able to use|Future Proof]] the notes you take today. * ~TiddlyWiki is infinitely customisable and extensible with many plugins that add new features * ~TiddlyWiki is the product of a collective of developers, part of an extensive community of users
- title: HelloThere
- type: text/vnd.tiddlywiki