You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/050-command-reference.md
+17-6
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ Serendipity commands are commands that help resolve to a random block from your
129
129
**Parameters**:
130
130
131
131
1. Page to pull a child from. Could be either:
132
-
- Option 1: **Page name**or **tag name** (brackets `[[]]` or hashtag `#` are optional)
132
+
- Option 1: **Page name**or **tag name** (brackets `[[]]` or hashtag `#` are optional)
133
133
- Option 2: Parent block UID
134
134
2. Levels within the page to include. Specifying 0 includes all blocks
135
135
3. Format to output the block in. See our [Formatting](050-command-reference.md#formatting) section for more info.
@@ -155,7 +155,7 @@ Serendipity commands are commands that help resolve to a random block from your
155
155
156
156
**Parameters**: One parameter that could be either:
157
157
158
-
- Option 1: **Page name**or **tag name** (brackets `[[]]` or hashtag `#` are optional)
158
+
- Option 1: **Page name**or **tag name** (brackets `[[]]` or hashtag `#` are optional)
159
159
- Option 2: Parent block UID
160
160
161
161
**Example**:
@@ -511,8 +511,8 @@ Special note: if you want a comma to be a part of the output, put a \ in front o
511
511
512
512
**Example**:
513
513
514
-
-`<%RESOLVEBLOCKREF:**abcdefghi**%>`
515
-
-`<%RESOLVEBLOCKREF:**`((abcdefghi))`**%>`
514
+
-`<%RESOLVEBLOCKREF:abcdefghi%>`
515
+
-`<%RESOLVEBLOCKREF:((abcdefghi))%>`
516
516
517
517
## SEARCH
518
518
@@ -735,7 +735,7 @@ If no value is specified, it's the same as checking if the block is empty
735
735
736
736
**Example**:
737
737
738
-
- ``<%IFMATCH:foo,true%>`
738
+
-`<%IFMATCH:foo,true%>`
739
739
-- checks if variable `foo` has value `true`. If no variable `foo` exists, it then checks to see if `foo` is equal in value to `true`, which would keep the block
740
740
741
741
## IFDATEOFYEAR
@@ -1012,14 +1012,25 @@ If it isn't, the block is not inserted
1012
1012
1013
1013
**Purpose**: Repeats the second argument a specified amount of times.
1014
1014
1015
+
If the first argument is another command (eg `<%CHILDREN%>`), then `Count of repeats` will be set to the number of results from that command.
1016
+
1017
+
This also passes SmartBlock variables:
1018
+
1019
+
-`ITERATION`: returns the current loop (eg: `1`, `2`, etc).
1020
+
-`ITERATIONVALUE`: returns the item being iterated over from the first argument.
1021
+
1015
1022
**Parameters**:
1016
1023
1017
-
1. Count of repeats
1024
+
1. Count of repeats (or a SmartBlock command that returns items to iterate over)
0 commit comments