Actions

Twig-table: Difference between revisions

From LimeSurvey Manual

(Created page with "=Twig conversion table= Twig uses variables and expressions to render templates. =Variables= {| class="wikitable" !Twig code!!Explanation |- |<nowiki>{{ surveylanguage }}</no...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Twig conversion table=
=Twig conversion table=
Twig uses variables and expressions to render templates.
Twig uses variables and expressions to render templates.
=Variables=
=Limesurvey variables=


{| class="wikitable"
{| class="wikitable"
!Twig code!!Explanation
!Variable name!!Explanation
|-
|-
|<nowiki>{{ surveylanguage }}</nowiki>||requests the language of the specific survey.
|<nowiki>{{ surveylanguage }}</nowiki>||requests the language of the specific survey.
|-
|-
|}
=Expressions=
{| class="wikitable"
!Twig code!!Explanation
|-
|<nowiki>{% if count(aSurveyInfo.aLoadForm.aErrors) > 0 %} capturing errors {% endif %}</nowiki>||check for errors, has to be handled within the if.
|-
|<nowiki>{% for item in items %} {{ item }} {% endfor %}</nowiki>||looping through sequences.
|}
|}

Latest revision as of 11:58, 11 May 2017

Twig conversion table

Twig uses variables and expressions to render templates.

Limesurvey variables

Variable name Explanation
{{ surveylanguage }} requests the language of the specific survey.