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

SetMultipleVariablesWidget

23rd October 2021 at 4:24pm

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.

AttributeDescription
$namesFilter evaluating to the names of a list of variables to assign
$valuesFilter 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:

  1. created: 20130822170200000
  2. icon: $:/core/icon
  3. 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?]]
  4. modified: 20241115170824144
  5. tags: Welcome
  6. 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
  7. title: HelloThere
  8. type: text/vnd.tiddlywiki