limit Modifier

Limits the number of items returned in an array.

playlist:
- Emancipator
- Gong Gong
- Possom Posse
- Justin Bieber
yaml

Use with the pipe syntax to continue chaining in a single tag like so:

{{ playlist | limit(2) | join }}
antlers
Emancipator, Gong Gong
html

Or using the parameter syntax:

{{ playlist | limit(2) }}
<li>{{ value }}</li>
{{ /playlist }}
antlers
<li>Emancipator</li>
<li>Gong Gong</li>
html
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →