Dynamic logo by languiage
Sometimes : we need loo by language. It can be great to have an option.
Tested code : need only one dot : logo.jpg is OK, my.logo.jpg is not OK
{% set brandlogofile = "" %}
{% if(aSurveyInfo.options.brandlogo == "on" and aSurveyInfo.options.brandlogofile) %}
{% set brandlogofile = aSurveyInfo.options.brandlogofile %}
{% if(processString("strpos('{"~brandlogofile~"','.')}")) %}
{% set brandlogoExt = processString("{substr('"~brandlogofile~"',strpos('"~brandlogofile~"','.'))}") %}
{% set brandlogoName = processString("{substr('"~brandlogofile~"',0,strpos('"~brandlogofile~"','.'))}") %}
{% set brandlogolang = imageSrc(brandlogoName ~ "-" ~ aSurveyInfo.languagecode ~ brandlogoExt, false) %}
{% if brandlogolang %}
{% set brandlogofile = brandlogoName ~ "-" ~ aSurveyInfo.languagecode ~ brandlogoExt %}
{% endif %}
{% endif %}
{% endif %}
Edited by Chenu Denis