Reputation: 513
I am getting an error saying my template is not correct.
The error goes like: Invalid block tag: 'endif', expected 'empty' or 'endfor'
My code is here, the bug is on the last line. Which part is not correct?
{% if entries %}
{% for entry in entries %}
<section class="no-padding" id="portfolio">
<div class="container-fluid">
(% if entry.scammer_name %}
<div class="row no-gutter result-wrapper control-group">
<div class="col-lg-3 result-label">
<label class="control-group result-padding">
suspect's name:
</label>
</div>
<div class="col-lg-9 result">
<label class="control-group result-padding light-font">
{{ entry.scammer_name }}
</label>
</div>
</div>
{% endif %}
</div>
</section>
{% endfor %}
{% endif %}
Upvotes: 0
Views: 3314
Reputation: 649
For loops require endfor tags
{% if mike %}
{% if jake %}
{% for x in squid %}
{{ x.do_stuff }}
{% endfor %}
{% endif %}{# closes jake tag #}
{% endif %}{# closes mike tag #}
Upvotes: 0