KeyValues Plugin
The “keyvalues” operator only works with DataTiddlers. Non data-tiddlers will be ignored!
keyvalues Operator
The keyvalues
operator uses an extended syntax that permits multiple fields and flags to be passed:
[keyvalues:<field list>:<separator>:<flag>[<operand>]]
-
field list: an ordered, comma delimited list. Either
key
,value
or both- defaults to
key,value
if blank
- defaults to
-
separator: a separator string used to combine the output string
- defaults to
:
=<colon><space>
if blank (new since V2.1.0) - If a space is needed, use:
- If a colon
:
is needed, use::
- defaults to
-
flag:
usekey
,usevalue
oruseboth
- (defaults to
usekey
if blank) - only 1 flag is allowed. The first one will be used
- (defaults to
- operand: filter operand
The following example lists both the key
and the value
. It uses the string -xx-
as a separator between key and value. It uses the regexp operand: digit-pattern
to filter by the key
<$set name="digit-pattern" value="[0][3-9]:">
[keyvalues:key,value:-xx-:usekey<digit-pattern>]
The available flags are:
-
usekey - the
key
will be used to filter the output. The<operand>
contains a regexp filter -
usevalue - the
value
will be used to filter the output. The<operand>
contains a regexp filter -
useboth - the
key
, theseperator
andvalue
will be used to filter the output. The<operand>
contains a regexp filter
Demo
- The demo can be found at: KeyValues — advanced data-tiddler functions
WikiLabs Suite
The WikiLabs Main Page gives an overview about all editions, plugins and themes.
There is an Introduction Video how to make the WikiLabs Plugin Library available in your own wikis, accessible from the ControlPanel → Plugins → Get More Plugins dialogue.
Code
- Links to the code repository can be found at the overview page
- Issues can be posted at: GitHub · Where software is built
About Open Source
Most open source software is free of charge and that’s a good thing! But that does not mean, that there are no costs for someone else to create, support and maintain it.
So if you use it: Support it!
Have fun!
Mario