splitted twig templates in multiple files
This commit is contained in:
14
views/pages/posts.twig
Normal file
14
views/pages/posts.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "layout.twig" %}
|
||||
|
||||
{% block title %}Articles{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% for post in posts %}
|
||||
<div class="post">
|
||||
<h2>{{ post.title }}</h2>
|
||||
<p>{{ post.content|nl2br }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>Aucun article publié.</p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user