Hi, struggling to work out how to do the following
template which calls an include for a menu, because the menu code is outputted twice (once for mobile, then again for the full screen menu) there is a little difference if the html code before hand for the right containers.
Can i set a variable to test in the include
{% set menunavigation = “responsive” %}
{% include ‘partials/navigation.html.twig’ %}
{% endblock %}
then later on
{% set menunavigation = “fullscreen” %}
{% include ‘partials/navigation.html.twig’ %}
{% endblock %}
then in the standard navigation.html.twig
{% if menunavigation=“responsive” %}
-
{ else% }
{% if menunavigation="fullscreen" %}
-
{% endif %}
then the normal navigation code
not sure if the scope would be seen or it needs to be passed as variable or a function
could some one clarify and tell me where I am going wrong :-/
Thank you