syanaputra / silverstripe-extra-template-syntax
Extra syntax for SilverStripe templating system.
1.0
2020-01-22 01:39 UTC
Requires
This package is auto-updated.
Last update: 2024-12-22 12:45:34 UTC
README
This module add extra syntaxes for SilverStripe templating system.
Installation
To install this module, simply run:
composer require syanaputra/silverstripe-extra-template-syntax
Usage
Repeat
Params:
- Total Repeat - How many times it has to repeat
- Starting Number - The starting number
Example:
<% loop $Repeat(3, 5) %>
{$Index}-
<% end_loop %>
Output:
5-6-7-
RepeatUntil
Params:
- Total Repeat - How many times it has to repeat
- Starting Number - The starting number
Example:
<% loop $RepeatUntil(5, 3) %>
{$Index}-
<% end_loop %>
Output:
3-4-5-