- Posts: 5061
- Thank you received: 1267
Ask the community, share ideas, and connect with other LimeSurvey users!
The simplest approach would be to have a modified layout_global.twig for the welcome page and the untouched one for every other page.DenisChenu wrote: For question : it's same content, i don't see how to hide specific part except with js /css related to this question.
{% if (aSurveyInfo.aNavigator.show and aSurveyInfo.include_content == 'firstpage') %} <!-- Do something in the Welcome page --> {% endif %} {% if (aSurveyInfo.aNavigator.show and aSurveyInfo.include_content != 'firstpage') %} <!-- Do something in question pages --> {% endif %} {% if (aSurveyInfo.aNavigator.show == null) %} <!-- Do something in the End page --> {% endif %}
That is the approach I was looking for. Thanks.tpartner wrote: I use something like this in layout_global.twig to target different pages:
layout_global is loaded …jelo wrote:
The simplest approach would be to have a modified layout_global.twig for the welcome page and the untouched one for every other page.DenisChenu wrote: For question : it's same content, i don't see how to hide specific part except with js /css related to this question.
A let me ask the question in a different way:
How can the "layout_global.twig" become flexible, to e.g. hide a div-section on the welcome page only. If I got you right, the TWIG "if" won't help me when it comes to page context? But the options of themes work in the same way, when it comes to hiding/showing parts.
{% if ( aSurveyInfo.include_content == 'firstpage') %} {% include './layout_firstpage.twig' {% else %} {% include './layout_default.twig' {% endif %}