- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
config.xml in Child Template wird nicht beachtet
- PeterAd
- Topic Author
- Offline
- New Member
Less
More
4 years 3 weeks ago #195739
by PeterAd
config.xml in Child Template wird nicht beachtet was created by PeterAd
Hallo Zusammen,
ich hoffe ich bin hier im richtigen Forum.
Ich habe ein Childtemplate auf dem Vanilla Template erstellt. Ich möchte jetzt ein optionales zweites Logo einbinden
Allerdings sehe ich leider kein zuätzliches Feld.
Das aktive config.xml ist immer noch im /themes Verzeichnis.
Danke für eure Tipps
PeterAd
Version (Version 4.1.11+200316 )
ich hoffe ich bin hier im richtigen Forum.
Ich habe ein Childtemplate auf dem Vanilla Template erstellt. Ich möchte jetzt ein optionales zweites Logo einbinden
Code:
<brandlogo type="buttons" category="Images" width="4" title="Logo" options="on|off" optionlabels="Yes|No">on</brandlogo> <brandlogofile type="dropdown" category="Images" width="6" title="Logo file" parent="brandlogo">themes/survey/vanilla/files/logo.png</brandlogofile> <secondlogo type="buttons" category="Images" width="4" title="SecondLogo" options="on|off" optionlabels="Yes|No">on</secondlogo> <secondlogofile type="dropdown" category="Images" width="6" title="SecondLogo file" parent="secondlogo">themes/survey/vanilla/files/logo.png</secondlogofile>
Allerdings sehe ich leider kein zuätzliches Feld.
Das aktive config.xml ist immer noch im /themes Verzeichnis.
Danke für eure Tipps
PeterAd
Version (Version 4.1.11+200316 )
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
4 years 3 weeks ago #195745
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic config.xml in Child Template wird nicht beachtet
This is the English part of the forum.
So please write English, or use the German part.
Dies ist der englische Teil des Forums.
Daher: Schreibe auf Englisch oder nutze den deutschen Teil.
Someone may move it to the German part.
Joffm
So please write English, or use the German part.
Dies ist der englische Teil des Forums.
Daher: Schreibe auf Englisch oder nutze den deutschen Teil.
Someone may move it to the German part.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- PeterAd
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 3 weeks ago - 4 years 3 weeks ago #195746
by PeterAd
Replied by PeterAd on topic config.xml in Child Template wird nicht beachtet
Sorry my fault
Hello,everybody,
I have created a based child template on the Vanilla Template. I would like to include an optional second logo now
However, unfortunately I do not see any additional field.
The active config.xml is still in the /themes directory.
Thanks for your tips
PeterAd
Version (Version 4.1.11+200316 )
Translated with www.DeepL.com/Translator (free version)
Hello,everybody,
I have created a based child template on the Vanilla Template. I would like to include an optional second logo now
Code:
<brand logo type="buttons" category="Images" width="4" title="Logo" options="on|off" optionlabels="Yes|No">on</brand logo> <brandlogofile type="dropdown" category="Images" width="6" title="Logo file" parent="brandlogo">themes/survey/vanilla/files/logo.png</brandlogofile> <secondlogo type="buttons" category="Images" width="4" title="SecondLogo" options="on|off" optionlabels="Yes|No">on</secondlogo> <secondlogofile type="dropdown" category="Images" width="6" title="SecondLogo file" parent="secondlogo">themes/survey/vanilla/files/logo.png</secondlogofile>
The active config.xml is still in the /themes directory.
Thanks for your tips
PeterAd
Version (Version 4.1.11+200316 )
Translated with www.DeepL.com/Translator (free version)
Last edit: 4 years 3 weeks ago by PeterAd. Reason: Wrong language
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
4 years 3 weeks ago #195749
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic config.xml in Child Template wird nicht beachtet
If you only want to insert a second logo,
and as you are able to read German.
www.limesurvey.org/forum/german-forum/12...einf%C3%BCgen#192948
Joffm
and as you are able to read German.
www.limesurvey.org/forum/german-forum/12...einf%C3%BCgen#192948
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- PeterAd
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 3 weeks ago #195767
by PeterAd
Replied by PeterAd on topic config.xml in Child Template wird nicht beachtet
Thank you very much.
But I want to enable the "normal" user to add an optional second logo.
But I want to enable the "normal" user to add an optional second logo.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 3 weeks ago #195772
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic config.xml in Child Template wird nicht beachtet
You will need to customize the options for your theme which involves two steps.
1) Modify the survey theme options screen to include your second image option.
2) Modify the survey layout TWIG file to display that image if the option is enabled.
For example, if extending vanilla...
Options TWIG File
Copy the themes/vanilla/options/options.js and themes/vanilla/options/options.twig files to upload/themes/survey/yourThemeName/options/.
Edit upload/themes/survey/yourThemeName/options/option.twig to insert something like this after the existing Brand Logo section:
You will end up with something like this in the backend:
Nav Bar TWIG File
Edit the Logo option section in \upload\themes\survey\yourThemeName\views\subviews\header\nav_bar.twig so it looks something like this:
The result is something like this:
1) Modify the survey theme options screen to include your second image option.
2) Modify the survey layout TWIG file to display that image if the option is enabled.
For example, if extending vanilla...
Options TWIG File
Copy the themes/vanilla/options/options.js and themes/vanilla/options/options.twig files to upload/themes/survey/yourThemeName/options/.
Edit upload/themes/survey/yourThemeName/options/option.twig to insert something like this after the existing Brand Logo section:
Code:
<!-- Brand Logo 2 --> <div class='row action_hide_on_inherit'> <div class='col-sm-12 col-md-4'> {# Brandlogo #} <div class='form-group row'> <label for='simple_edit_options_brandlogo' class='control-label'>Brandlogo 2</label> <div class='col-sm-12'> <div class="btn-group" data-toggle="buttons"> <label class="btn btn-default"> <input type='radio' name='brandlogo2' value='on' class='selector_option_radio_field ' data-id='simple_edit_options_brandlogo'/> {{gT("Yes" )}} </label> <label class="btn btn-default"> <input type='radio' name='brandlogo2' value='off' class='selector_option_radio_field ' data-id='simple_edit_options_brandlogo'/> {{ gT("No") }} </label> </div> </div> </div> </div> <div class='col-sm-8 col-md-6'> {# Brandlogo file selector #} <div class='form-group row'> <label for='simple_edit_options_brandlogofile2' class='control-label'>Brandlogo 2 file</label> <div class='col-sm-12'> <select class='form-control selector_option_value_field selector_radio_childfield selector_image_selector' data-parent="brandlogo2" id='simple_edit_options_brandlogofile2' name='brandlogofile2'> {% set optgroup = '' %} {% for image in templateConfiguration.imageFileList %} {% if image.group != optgroup %} {% if optgroup != '' %} </optgroup> {% endif %} <optgroup label="{{image.group}}"> {% set optgroup = image.group %} {% endif %} <option data-lightbox-src="{{image.preview}}" value="{{image.filepath}}">{{image.filename}}</option> {% endfor %} </optgroup> </select> </div> </div> </div> <div class='col-sm-4 col-md-2'> <br/> <button class="btn btn-default selector__open_lightbox" data-target="#simple_edit_options_brandlogofile2"> {{ gT('Preview image')}}</button> </div> </div>
You will end up with something like this in the backend:
Nav Bar TWIG File
Edit the Logo option section in \upload\themes\survey\yourThemeName\views\subviews\header\nav_bar.twig so it looks something like this:
Code:
{# Logo option #} {% if( aSurveyInfo.options.brandlogo == "on" or aSurveyInfo.options.brandlogo2 == "on") %} {% if( aSurveyInfo.options.brandlogo == "on") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-responsive"}) }} </div> {% endif %} {% if( aSurveyInfo.options.brandlogo2 == "on") %} <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container hidden-xs" {{ aSurveyInfo.attr.navbarbrand }} > {{ image(aSurveyInfo.options.brandlogofile2, aSurveyInfo.name, {"class": "logo img-responsive"}) }} </div> {% endif %} {% else %} <div class="{{ aSurveyInfo.class.navbarbrand }}" {{ aSurveyInfo.attr.navbarbrand }} > {{ aSurveyInfo.name }} </div> {% endif %}
The result is something like this:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- PeterAd
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 3 weeks ago #195774
by PeterAd
Replied by PeterAd on topic config.xml in Child Template wird nicht beachtet
Looks good.
Thank You
Cheers Peter
Thank You
Cheers Peter
The topic has been locked.
- PeterAd
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
4 years 3 weeks ago #195892
by PeterAd
Replied by PeterAd on topic config.xml in Child Template wird nicht beachtet
Thanks for your help, It works.
The topic has been locked.