- Posts: 2
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
{# Logo option #} {% if( aSurveyInfo.options.brandlogo == "on") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {% if( SURVEYLANG == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% else %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %} </div> {% else %} <div class="{{ aSurveyInfo.class.navbarbrand }}" {{ aSurveyInfo.attr.navbarbrand }} > {{ aSurveyInfo.name }} </div> {% endif %}
{% if( aSurveyInfo.surveyls_language == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% else %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %}
{{ dump(aSurveyInfo) }}
{% if( aSurveyInfo.surveyls_language == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% else if( aSurveyInfo.surveyls_language == "it") %} {{ image( "./files/logo_it_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% else %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %}
[code]
{% if( aSurveyInfo.surveyls_language == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% if( aSurveyInfo.surveyls_language == "it") %} {{ image( "./files/logo_it_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% if( aSurveyInfo.surveyls_language == "de") %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %}
{% if( aSurveyInfo.surveyls_language == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% if( aSurveyInfo.surveyls_language == "it") %} {{ image( "./files/logo_it_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% if( aSurveyInfo.surveyls_language != "fr" and aSurveyInfo.surveyls_language != "it") %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %}
{{ image( "./files/logo_" ~ aSurveyInfo.surveyls_language ~ "_quer.png", 'anytext', {"class": "logo img-responsive"}) }}
I see elseif:I don't think you have else if in twig :
twig.symfony.com/doc/2.x/tags/if.html
{# Logo language option #} {% if( aSurveyInfo.surveyls_language == "de") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_D_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% if( aSurveyInfo.surveyls_language == "fr") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_F_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% if( aSurveyInfo.surveyls_language == "it") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_I_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% endif %}
{% if( aSurveyInfo.surveyls_language == "de") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_D_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% endif %} {% if( aSurveyInfo.surveyls_language == "fr") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_F_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% endif %} {% if( aSurveyInfo.surveyls_language == "it") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image( "./files/WBF_SBFI_I_RGB_pos_hoch.png", 'Logo', {"class": "logo img-responsive"}) }} </div> {% endif %}
{% if( aSurveyInfo.surveyls_language == "fr") %} {{ image( "./files/logo_fr_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% elseif( aSurveyInfo.surveyls_language == "it") %} {{ image( "./files/logo_it_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% else %} {{ image( "./files/logo_de_quer.png", 'anytext', {"class": "logo img-responsive"}) }} {% endif %}