]> git.parisson.com Git - mezzo.git/commitdiff
Fix pagination on home slider
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Tue, 11 Oct 2016 15:33:21 +0000 (17:33 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Tue, 11 Oct 2016 15:33:21 +0000 (17:33 +0200)
app/templates/home/inc/slider.html

index 8cc3630fc54bdd246b7e85c28567668a1703c228..2684d1fc32122cb50de75d94813f543379a39cbe 100644 (file)
                 <div class="col-xs-12 col-sm-11 col-sm-push-1">
                     <ul class="">
                         {% for slider in home.dynamiccontenthomeslider_set.all %}
-                            <li class="{% if forloop.first %}active{% endif %}">
-                                <a href="#"></a>
-                            </li>
+                            {% with slider.content_object.images.all|get_type:'slider' as images %}
+                                {% if images %}
+                                    <li class="{% if forloop.first %}active{% endif %}">
+                                        <a href="#"></a>
+                                    </li>
+                                {% endif %}
+                            {% endwith %}
                         {% endfor %}
                     </ul>
                 </div>