block

The block function is used to render the contents of a block tag more than once.

Example

{% block "testBlock" %}Some content
{% endblock %}
{{ block("testBlock") }}

Output

Some contentSome content

max

The max function will return the largest of it's numerical arguments.

Example

{{ max(5, 3) }}

Output

5

min

The min function will return the smallest of it's numerical arguments.

Example

{{ min(5, 3) }}


3

parent

The parent function is used inside of a block to render the content that the parent template would have rendered inside of the block had the current template not overriden it.

Template

{% block "${blockName}" %}
{{ parent() }}
{% endblock %}

range

The range function will return a list containing an arithmetic progression of numbers.

Example

{{ range(3, 6) }}

Output

[3, 4, 5, 6]

range with step

The range function will return a list containing an arithmetic progression of numbers.

Example

{{ range(2, 10, 2) }}

Output

[2, 4, 6, 8, 10]

bool

The bool function will return a boolean from parsing a value.

Example

{{ bool("T") }}

Output

true


Example 2

{{ bool(0) }}

Output

false

codepoint

The codepoint function will return the character for the specified Unicode code point.

Example

{{ codepoint(34) }}

Output

"

combine lists

The combineLists function will return a merged list of the two arguments.

Example

{% set listA = [ "a", "b", "c" ] %}
{% set listB = [ "d", "c", "e" ] %}
{{ combineLists(false, listA, listB) }}
{{ combineLists(true, listA, listB) }}

Output

[a, b, c, d, c, e][a, b, c, d, e]

double

The double function will return an int for the provided Number argument or attempt to parse a String into a double.

Example

{{ double(3.145) }}

Output

3.145


Example 2

{{ double("3.145") }}

Output

3.145

int

The int function will return an int for the provided Number argument or attempt to parse a String into an int.

Example

{{ int(3.145) }}

Output

3


Example 2

{{ int("3.145") }}

Output

3

replace start

The replaceStart function will return a String where str will be checked if it starts with match and if so be replaced with replace.

Example

{{ replaceStart("prefix", "pre", "suf", false) }}

Output

suffix

replace end

The replaceEnd function will return a String where str will be checked if it ends with match and if so be replaced with replace.

Example

{{ replaceEnd("completion", "ion", "ed", false) }}

Output

completed

str is equals

The strIsEquals function will return a boolean for whether the provided String arguments are equal. Safely handles null values.

Example

{{ strIsEquals("a", "A", true) }}

Output

true


Example 2

{{ strIsEquals("a", null) }}

Output

false

starts with ignore case

The startsWithIgnoreCase function will return a boolean for whether the provided str begins with match while ignoring casing.

Example

{{ startsWithIgnoreCase("SuperMan", "super") }}

Output

true

ends with ignore case

The endsWithIgnoreCase function will return a boolean for whether the provided str ends with match while ignoring casing.

Example

{{ endsWithIgnoreCase("SuperMan", "man") }}

Output

true

  • No labels