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...")
 
No edit summary
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"
Line 8: Line 8:
|<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.
|}
|}

Revision as of 11:57, 11 May 2017

Twig conversion table

Twig uses variables and expressions to render templates.

Limesurvey variables

Twig code Explanation
{{ surveylanguage }} requests the language of the specific survey.