12345678910111213141516171819202122232425 |
- {% extends "base.html.twig" %}
- {% block title %}My cool blog posts{% endblock %}
- {% block body %}
- {% for entry in blog_entries %}
- {#
- - Notice the use of multiple possible templates
- - The parameters passing here would be useless: by default all
- parameters are transmitted to included templates. But they are needed
- because we added with_context = false
- - ignore_missing: don't complain if no matching template is found
- - sandbox: sanitize used-submitted templates
- #}
- {{ include(['blog/post-inline.html.twig', 'blog/post-block.html.twig'], { 'article': entry }, with_context = false) }}
- {% if not loop.last %}<hr />{% endif %}
- {% endfor %}
- <p>{{ pager }}</p>
- {% endblock %}
- {% block stylesheets %}
- {{ parent() -}}
- <link rel="stylesheet" href="{{ asset('styles/blog.css') }}" />
- {% endblock %}
|