<div class="container-fluid">
{% if pics %}
{% for pic in pics %}
{% if loop.first %}
<div class="text-center"><img src="/pics/products/{{ pic.picL }}" class="well image-round product-photo-primary"></div>
<ul class="product-photo-box row">
{% endif %}
<li data-src="/pics/products/{{ pic.picL }}" class="col-lg-2 col-md-2 col-sm-2">
<img src="/pics/products/{{ pic.picL }}" class="well image-round">
</li>
{% if loop.last %}
</ul>
{% endif %}
{% endfor %}
{% else %}
<div class="text-center"><img src="/pics/products-face/{{ product.picL }}" class="well image-round product-photo-primary"></div>
{% endif %}
</div>
Hey guys!
Tell me please, why first condition (if pics) dont work? I tried to to change the "pics is iterable" but still it did not help.
pics - array(data of model) or false:
...
$productPics = ProductPics::find('pid = ' . $product->id );
...
$this->view->pics = $productPics ? $productPics : false;
Please help me! (And sorry for a bad dialect english, it's not my lang)