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. 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?]] [[HelloThumbnail - TWEUM2017]]
  3. modified: 20211208115833846
  4. tags: TableOfContents
  5. text: ''Have you ever had the feeling that your head is not quite big enough to hold everything you need to remember?'' 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. <div style="font-size:0.7em;text-align:center;margin-top:2em;margin-bottom:2em;"> <<list-thumbnails filter:"[tag[HelloThumbnail]]" width:"168" height:"95">> </div> Unlike conventional online services, 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. <div style="font-size:0.7em;text-align:center;margin:3em auto;"> <a href="https://groups.google.com/group/TiddlyWiki" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF8C19;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/help}} Forum </a> <a href="https://www.youtube.com/c/JeremyRuston" class="tc-btn-big-green" style="border-radius:4px;background-color:#e52d27;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/video}} ~YouTube </a> <a href="https://twitter.com/TiddlyWiki" class="tc-btn-big-green" style="border-radius:4px;background-color:#5E9FCA;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/twitter}} Twitter </a> <a href="https://github.com/Jermolene/TiddlyWiki5" class="tc-btn-big-green" style="border-radius:4px;background-color:#444;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/github}} ~GitHub </a> <a href="https://gitter.im/TiddlyWiki/public" class="tc-btn-big-green" style="border-radius:4px;background-color:#753a88;background-image:linear-gradient(to left,#cc2b5e,#753a88);" target="_blank" rel="noopener noreferrer"> {{$:/core/images/gitter}} Gitter </a> </div> <<<.tc-big-quote ''The ~TiddlyWiki is the best software I've ever found for organising my ideas.'' It's well worth spending an hour or so playing with it to see how it can help you. This will be time well-spent and will change how you think and how you organise your ideas. <<< [[Joe Armstrong, Co-inventor of Erlang|https://joearms.github.io/]] <<<.tc-big-quote ''~TiddlyWiki gets a Gearhead rating of 6 out of 5 (it's that good).'' Finding code that works flawlessly after just two or three years is magical enough but after seven years?! <<< [[Mark Gibbs, Network World|http://www.networkworld.com/article/3028098/open-source-tools/tiddlywiki-a-free-open-source-wiki-revisited.html]] <div style="font-size:0.7em;text-align:center;margin:3em auto;">{{Product Hunt Link}}</div>
  6. title: HelloThere
  7. type: text/vnd.tiddlywiki