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
`{csrfToken}` prints out the session's CSRF token (“Security Token”).
136
136
@@ -149,7 +149,7 @@ Please [check the implementation](https://github.com/WoltLab/WCF/blob/master/wcf
149
149
150
150
## `{cycle}`
151
151
152
-
`cycle` can be used to cycle between different values:
152
+
`{cycle}` can be used to cycle between different values:
153
153
154
154
```smarty
155
155
{cycle name=fooCycle values='bar,baz'} {* prints 'bar' *}
@@ -161,7 +161,7 @@ Please [check the implementation](https://github.com/WoltLab/WCF/blob/master/wcf
161
161
{cycle name=fooCycle} {* prints 'bar' *}
162
162
```
163
163
164
-
!!! info "The values attribute only has to be present for the first call. If `cycle` is used in a loop, the presence of the same values in consecutive calls has no effect. Only once the values change, the cycle is reset."
164
+
!!! info "The values attribute only has to be present for the first call. If `{cycle}` is used in a loop, the presence of the same values in consecutive calls has no effect. Only once the values change, the cycle is reset."
165
165
166
166
| Attribute | Description |
167
167
|-----------|-------------|
@@ -176,7 +176,7 @@ Please [check the implementation](https://github.com/WoltLab/WCF/blob/master/wcf
176
176
177
177
## `{dateInterval}`
178
178
179
-
`dateInterval` calculates the difference between two unix timestamps and generated a textual date interval.
179
+
`{dateInterval}` calculates the difference between two unix timestamps and generated a textual date interval.
@@ -192,7 +192,7 @@ Please [check the implementation](https://github.com/WoltLab/WCF/blob/master/wcf
192
192
193
193
## `{event}`
194
194
195
-
`event` provides extension points in templates that [template listeners](../package/pip/template-listener.md) can use.
195
+
`{event}` provides extension points in templates that [template listeners](../package/pip/template-listener.md) can use.
196
196
197
197
```smarty
198
198
{event name='foo'}
@@ -224,7 +224,7 @@ One prominent example is a template event:
224
224
```
225
225
226
226
In this example, if `$foo !== 'bar'`, the list will not be shown, regardless of the additional template code provided by template listeners.
227
-
In such a situation, `hascontent` has to be used:
227
+
In such a situation, `{hascontent}` has to be used:
228
228
229
229
```smarty
230
230
{hascontent}
@@ -240,10 +240,10 @@ In such a situation, `hascontent` has to be used:
240
240
{/hascontent}
241
241
```
242
242
243
-
If the part of the template wrapped in the `content` tags has any (trimmed) content, the part of the template wrapped by `hascontent` tags is shown (including the part wrapped by the `content` tags), otherwise nothing is shown.
243
+
If the part of the template wrapped in the `{content}` tags has any (trimmed) content, the part of the template wrapped by `{hascontent}` tags is shown (including the part wrapped by the `{content}` tags), otherwise nothing is shown.
244
244
Thus, this construct avoids an empty list compared to the `if` solution above.
245
245
246
-
Like `foreach`, `hascontent` also supports an `else` part:
246
+
Like `{foreach}`, `{hascontent}` also supports an `else` part:
247
247
248
248
```smarty
249
249
{hascontent}
@@ -260,7 +260,7 @@ Like `foreach`, `hascontent` also supports an `else` part:
260
260
261
261
## `{htmlCheckboxes}`
262
262
263
-
`htmlCheckboxes` generates a list of HTML checkboxes.
263
+
`{htmlCheckboxes}` generates a list of HTML checkboxes.
@@ -303,7 +303,7 @@ Like `foreach`, `hascontent` also supports an `else` part:
303
303
|`options`| array selectable options with the key used as `value` attribute and the value as the option label; if a value is an array, an `optgroup` is generated with the array key as the `optgroup` label |
304
304
|`selected`| current selected value(s) |
305
305
306
-
All additional attributes are added as attributes of the `select` HTML element.
306
+
All additional attributes are added as attributes of the `<select>` HTML element.
307
307
308
308
309
309
## `{icon}`
@@ -325,7 +325,7 @@ All additional attributes are added as attributes of the `select` HTML element.
325
325
326
326
## `{implode}`
327
327
328
-
`implodes` transforms an array into a string and prints it.
328
+
`{implodes}` transforms an array into a string and prints it.
`objectAction` generates action buttons to be used in combination with the [`WoltLabSuite/Core/Ui/Object/Action` API](../migration/wsc53/javascript.md#wcfactiondelete-and-wcfactiontoggle).
439
+
`{objectAction}` generates action buttons to be used in combination with the [`WoltLabSuite/Core/Ui/Object/Action` API](../migration/wsc53/javascript.md#wcfactiondelete-and-wcfactiontoggle).
440
440
For detailed information on its usage, we refer to the extensive documentation in the [`ObjectActionFunctionTemplatePlugin` class](https://github.com/WoltLab/WCF/blob/master/wcfsetup/install/files/lib/system/template/plugin/ObjectActionFunctionTemplatePlugin.class.php) itself.
441
441
442
442
443
443
## `{page}`
444
444
445
-
`page` generates an internal link to a CMS page.
445
+
`{page}` generates an internal link to a CMS page.
446
446
447
447
```smarty
448
448
{page}com.woltlab.wcf.CookiePolicy{/page}
@@ -465,7 +465,7 @@ For detailed information on its usage, we refer to the extensive documentation i
465
465
466
466
!!! info "This template plugin has been deprecated in WoltLab Suite 6.0."
467
467
468
-
`pages` generates a pagination.
468
+
`{pages}` generates a pagination.
469
469
470
470
```smarty
471
471
{pages controller='FooList' link="pageNo=%d" print=true assign=pagesLinks} {* prints pagination *}
@@ -488,7 +488,7 @@ For detailed information on its usage, we refer to the extensive documentation i
488
488
489
489
## `{plural}`
490
490
491
-
`plural` allows to easily select the correct plural form of a phrase based on a given `value`.
491
+
`{plural}` allows to easily select the correct plural form of a phrase based on a given `value`.
492
492
The pluralization logic follows the [Unicode Language Plural Rules](https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.md) for cardinal numbers.
493
493
494
494
The `#` placeholder within the resulting phrase is replaced by the `value`.
@@ -544,7 +544,7 @@ Note the difference between `1` (exactly `1`) and `one` (ending in `1`, except e
544
544
545
545
## `{prepend}`
546
546
547
-
If a string should be prepended to the value of a variable, `prepend` can be used:
547
+
If a string should be prepended to the value of a variable, `{prepend}` can be used:
548
548
549
549
```smarty
550
550
{assign var=templateVariable value='newValue'}
@@ -556,13 +556,13 @@ If a string should be prepended to the value of a variable, `prepend` can be use
556
556
{$templateVariable} {* now prints '2newValue' *}
557
557
```
558
558
559
-
If the variables does not exist yet, `prepend` creates a new one with the given value.
560
-
If `prepend` is used on an array as the variable, the value is prepended to all elements of the array.
559
+
If the variables does not exist yet, `{prepend}` creates a new one with the given value.
560
+
If `{prepend}` is used on an array as the variable, the value is prepended to all elements of the array.
561
561
562
562
563
563
## `{time}`
564
564
565
-
`time` allows to output times in different (human readable) formats.
565
+
`{time}` allows to output times in different (human readable) formats.
566
566
Acceptables inputs are either a `\DateTimeInterface` or an integer representing a Unix timestamp.
567
567
568
568
```smarty
@@ -589,7 +589,7 @@ Acceptables inputs are either a `\DateTimeInterface` or an integer representing
589
589
590
590
## `{user}`
591
591
592
-
`user` generates links to user profiles.
592
+
`{user}` generates links to user profiles.
593
593
The mandatory `object` parameter requires an instances of `UserProfile`.
594
594
The optional `type` parameter is responsible for what the generated link contains:
0 commit comments