4
My list
has the code below:
<h1>Posts</h1>
{% for posts in post %}
<article>
<h2>
{% post.titulo %}
</h2>
<div class="content">
{% post.conteudo %}
</div>
</article>
{% endfor %}
but when running, I get the following error message:
Unexpected tag name "post" (expecting closing tag for the "for" tag defined near line 3) in /home/Jose/Downloads/projects/Symfony/src/Learnsf/Bundle/Blogbundle/Resources/views/Post/list.html.Twig at line 5
How to fix?
– siesler
check that the posts variable is not empty, with no content.
– rafaelmorais
in symfony profiler > Doctrine, expanding queries, shows a line as a result (exactly the number of records I have in the database). Some other alternative?
– siesler