- Posts: 222
- Thank you received: 10
Ask the community, share ideas, and connect with other LimeSurvey users!
LouisGac wrote: krosser: if you're a limeSurvey Pro user I can do it live for you
{# Logo option #} {% if( aSurveyInfo.options.brandlogo == "on") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {% if( aSurveyInfo.surveyls_language == "en") %} {{ image('./files/logo_en.png', 'English logo', {"class": "logo-en"}) }} {% elseif( aSurveyInfo.surveyls_language == "fr") %} {{ image('./files/logo_fr.png', 'French logo', {"class": "logo-fr"}) }} {% else %} {{ image('./files/logo_default.png', 'Default logo', {"class": "logo-default"}) }} {% endif %} </div> {% else %} <div class="{{ aSurveyInfo.class.navbarbrand }}" {{ aSurveyInfo.attr.navbarbrand }} > {{ aSurveyInfo.name }} </div> {% endif %}
<div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {#{{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-responsive"}) }}#} {{ image('./files/logo-eng.png', 'alt-text for my file', {"class": "logo-en"}) }} {{ image('./files/logo-fr.png', 'alt-text for my file', {"class": "logo-fr"}) }} </div>
It looks like you did not upload the images to the correct location or with the wrong names.Unfortunately, this code did not work for me. Tried it in Vanilla and Bootswatch and it does not show any logos.
tpartner wrote:
It looks like you did not upload the images to the correct location or with the wrong names.Unfortunately, this code did not work for me. Tried it in Vanilla and Bootswatch and it does not show any logos.
tpartner wrote: Here is an example of how to use an IF statement to render a language-dependent logo image:
Code:{# Logo option #} {% if( aSurveyInfo.options.brandlogo == "on") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {% if( aSurveyInfo.surveyls_language == "en") %} {{ image('./files/logo_en.png', 'English logo', {"class": "logo-en"}) }} {% elseif( aSurveyInfo.surveyls_language == "fr") %} {{ image('./files/logo_fr.png', 'French logo', {"class": "logo-fr"}) }} {% else %} {{ image('./files/logo_default.png', 'Default logo', {"class": "logo-default"}) }} {% endif %} </div> {% else %} <div class="{{ aSurveyInfo.class.navbarbrand }}" {{ aSurveyInfo.attr.navbarbrand }} > {{ aSurveyInfo.name }} </div> {% endif %}