-
Notifications
You must be signed in to change notification settings - Fork 0
Functions List
tacoen edited this page Jan 14, 2021
·
10 revisions
In usage
pop: {{ popularity('monthly')|raw }}
{{ fileget(page.path()~"/coba.txt")|raw }}
Syntax: stripper([text],[compress])
Strip empty lines, trailing spaces, leading spaces.
param | type |
---|---|
text | string |
compress | boolean |
{% set multiline = 'what are worldwide web' %}
{{ multiline|stripper(true) }}
Syntax: filedir([relative_path_to_root],[pattern])
param | type |
---|---|
relative_path_to_root | string |
pattern | string |
{% for file in filedir('/user/themes/neoca/particles/tema','*.html.twig') %}
{% set f = file|replace({
'/user/themes/neoca/particles/tema/':'',
'.html.twig':''
}) %}
{{ f|raw }}
{% endfor %}
Syntax: `fileget([filename])'
param | type |
---|---|
filename | string |
{% set content = fileget('/user/themes/neoca/particles/tema/file.txt') %}
{{ content|markdown|raw }}
syntax: {{ randomwords([count]) }}
param | type |
---|---|
count | int |
Put string to config. gas
Syntax: gasvara([where],[string])
You can output this array by {{ config.gas.where|print_r }}
param | type |
---|---|
where | string |
string | string |
{% set module_injectjs = module_injectjs ~ "ncc_construct_pallete('#"~id~"');" %}
{% do gasvara('inline_js',module_injectjs) %}
{# output #}
{{ config.gas.inline_js|sort|join('\n')|stripper|raw }}
Neocà, Neocàtema designed by tacoen