1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-07 20:44:23 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/toggle Operator (Examples).tid
saqimtiaz 445c15e719
Extend toggle operator (#5015)
* Extend toggle operator to support optional second operand to toggle a value pair

* Added tests for extended toggle filter

* Updated docs for toggle operator
2020-11-09 18:27:45 +00:00

27 lines
579 B
Plaintext

created: 20201107154352695
modified: 20201109104951727
title: toggle Operator (Examples)
type: text/vnd.tiddlywiki
<<.using-days-of-week>>
<<.operator-example 1 """[list[Days of the Week]] +[toggle[Wednesday]]""">>
To toggle a tag in a tiddler:
```
<$action-listops $tiddler="target" $tags="+[toggle[done]]" />
```
To toggle a title in a field:
```
<$action-listops $tiddler="target" $field="my-field" $subfilter="+[toggle[done]]" />
```
To toggle between a value pair:
```
<$action-listops $tiddler="target" $field="my-field" $subfilter="+[toggle[todo],[done]]" />
```