index.html.twig 776 B

1234567891011121314151617181920
  1. {% extends "base.html.twig" %}
  2. {% block title %}My cool blog posts{% endblock %}
  3. {% block body %}
  4. {% for entry in blog_entries %}
  5. {#
  6. - Notice the use of multiple possible templates
  7. - The parameters passing here would be useless: by default all
  8. parameters are transmitted to included templates. But they are needed
  9. because we added with_context = false
  10. - ignore_missing: don't complain if no matching template is found
  11. - sandbox: sanitize used-submitted templates
  12. #}
  13. {{ include(['blog/post-inline.html.twig', 'blog/post-block.html.twig'], { 'article': entry }, with_context = false) }}
  14. {% if not loop.last %}<hr />{% endif %}
  15. {% endfor %}
  16. <p>{{ pager }}</p>
  17. {% endblock %}