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?]]
  3. modified: 20221219184500440
  4. tags: TableOfContents
  5. text: !! ''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. 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. !! ''Find Out More'' <div class="tc-cards"> <$list filter="[tag[HelloThumbnail]]"> <$macrocall $name="flex-card" captionField="caption" descriptionField="text"/> </$list> </div> !! ''~TiddlyWiki Hubs'' <div class="tc-cards" style="font-size:0.7em;text-align:center;margin:3em auto;"> <a href="https://talk.tiddlywiki.org/" class="tc-btn-big-green" style="border-radius:4px;background-color:#FF8C19;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/help}} ~TalkTW </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:#1DA1F2;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/twitter}} Twitter </a> <a rel="me" href="https://fosstodon.org/@TiddlyWiki" class="tc-btn-big-green" style="border-radius:4px;background-color:#2b90d9;" target="_blank" rel="noopener noreferrer"> {{$:/core/images/mastodon}} Mastodon </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> !! ''Testimonials & Reviews'' <div class="tc-cards"> <$list filter="[tag[Testimonial]]"> <$macrocall $name="flex-card" class="tc-card-quote" captionField="caption" descriptionField="text"/> </$list> </div>
  6. title: HelloThere
  7. type: text/vnd.tiddlywiki