1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-02 18:23:28 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/filters/examples/cycle Operator (Examples).tid
saqimtiaz 4f07539164
Cycle operator improvements plus docs (#5069)
* Tweak cycle operator to support step size parameter and add docs for toggle and cycle

* Mention that title list should have no duplicates
2020-11-20 18:37:23 +00:00

21 lines
682 B
Plaintext

created: 20201118174250896
modified: 20201118175415868
tags: [[Operator Examples]] [[cycle Operator]]
title: cycle Operator (Examples)
type: text/vnd.tiddlywiki
Cycle through a list of values to add as a tag:
```
<$action-listops $tiddler="target" $tags="+[cycle[todo soon now maybe done ]]" />
```
Cycle through a list of values to add as a tag, in reverse order:
```
<$action-listops $tiddler="target" $tags="+[cycle[todo soon now maybe done ],[-1]]" />
```
<<.using-days-of-week>>
<<.operator-example 1 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list}]""">>
<<.operator-example 1 """[list[Days of the Week]first[]] +[cycle{Days of the Week!!list},[2]]""">>