index.html.twig 904 B

12345678910111213141516171819202122232425
  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 %}
  18. {% block stylesheets %}
  19. {{ parent() -}}
  20. <link rel="stylesheet" href="{{ asset('styles/blog.css') }}" />
  21. {% endblock %}