I'm fetching a recordset, and doing a for loop to display the data like so:
{% for category in categories %}
{"img":"{{ category.pr_image }}",
"url":"{{ category.pr_store_url }}",
"type":"ca",
"price":"{{ category.pr_price }}",
"store":"{{ category.pr_store }}",
"name":"{{ category.pr_name }}",
"lat":"{{ category.st_lat }}",
"long":"{{ category.st_long }}"},
{% endfor %}
That works great.
However, a few lines of code down the line i have this, which does not work so great:
{% for category in categories %}
<li class="msli">
<ul class="detali">
<li><a href="{{ category.pr_store_url }}" target="_blank">{{ category.pr_store }}</a></li>
<li>Category: {{ category.pr_cat_name }}</li>
</ul>
</li>
{% endfor %}
As far as i can tell it's the same code, only different formating. If code 1 produces one result, Code 2 does produce one output, but no data. The output is only:
<li class="msli">
<ul class="detali">
<li><a target="_blank" href=""/></li>
<li>Category: </li>
</ul>
</li>
And no data... What am i doing wrong?
Oh, and both for cycles are wrapped in a if case...
{% if products or stores or categories %}