Skip to content

syanaputra/silverstripe-extra-template-syntax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silverstripe-extra-template-syntax

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-

About

Extra syntax for SilverStripe template system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages