I have a set of pages that use a specific template "example.html.twig". All the pages that use this template have a common section after their main content, but ONLY if a specific frontmatter variable is NOT set. So I have this bit of code after the main content section in my base.html.twig:
{% block extra %}
{% if page.header.status != "whatever" %}
{% include 'partials/example.html.twig' with {'page': page.find('/extra', true)} %}
{% endif %}
{% endblock %}
This basically works, but only the heading is taken from the /extra page – the text is the same as in the main section of that page. So I'm thinking there might be a conflict between the page variables in use? But which would I change, and how?
Really grateful for any ideas!