modular.html.twig 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {% extends 'partials/base.html.twig' %}
  2. {% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
  3. {% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
  4. {% block javascripts %}
  5. {% if show_onpage_menu %}
  6. {% do assets.add('theme://js/singlepagenav.min.js') %}
  7. {% endif %}
  8. {{ parent() }}
  9. {% endblock %}
  10. {% block bottom %}
  11. {{ parent() }}
  12. {% if show_onpage_menu %}
  13. {% endif %}
  14. {% endblock %}
  15. {% block header_navigation %}
  16. {% include 'partials/navigation.html.twig' %}
  17. {% include 'partials/taxonomylist.html.twig' with { taxonomy: 'category'} %}
  18. {% endblock %}
  19. {% block hero %}
  20. {% for module in page.collection() if module.template == 'modular/hero' %}
  21. <div id="{{ _self.pageLinkName(module.menu) }}"></div>
  22. {{ module.content }}
  23. {% endfor %}
  24. {% endblock %}
  25. {% block body %}
  26. <section id="body-wrapper">
  27. <section id="container">
  28. <div id="items" class="column">
  29. <div class="content-item">
  30. <div class="e-content {{page.title|lower}}">
  31. {% for module in page.collection() %}
  32. {{ module.content }}
  33. {% endfor %}
  34. </div>
  35. </div>
  36. </div>
  37. </section>
  38. </section>
  39. {% endblock %}