This is my first post, so bear with me… I’m writing my custom theme based on the modular one-page skeleton. I now have a modular twig template with the basic for loop (from the skeleton) to print out all 3 modules underneath each other. But what I would love to have is an extra wrapper div around the last 2 ones. I’ve included an example screenshot. Here is my current code, but it’s wrapper the other wrapper div around all sections…
Thanks in advance!
{% if module.content.isFirst() %}
{% for module in page.collection() %}
<section class="{{ module.title }}">
{{ module.content }}
</section>
{% endfor %}
{% else %}
<div class="other-wrapper">
{% for module in page.collection() %}
<section class="{{ module.title }}">
{{ module.content }}
</section>
{% endfor %}
</div>
{% endif %}
No it doesn’t. It also wraps the intro section into the other wrapper. I just noticed that the if statement sits outside the for loop. I’ll let you know tomorrow.