Show carousel indicators only if we have more than 1 item

This commit is contained in:
M.Ravi 2017-11-23 17:15:19 +01:00
parent db4362af01
commit f4b252ff09

View file

@ -2,12 +2,13 @@
<header class="header_slider" style="background-image: url({{ instance.background_image.url }})"> <header class="header_slider" style="background-image: url({{ instance.background_image.url }})">
<div id="carousel-header-ungleich" class="carousel slide" data-ride="carousel" data-interval="{{ instance.carousel_data_interval}}"> <div id="carousel-header-ungleich" class="carousel slide" data-ride="carousel" data-interval="{{ instance.carousel_data_interval}}">
<!-- Indicators --> <!-- Indicators -->
{% if instance.child_plugin_instances|length > 1 %}
<ol class="carousel-indicators"> <ol class="carousel-indicators">
{% for plugin in instance.child_plugin_instances %} {% for plugin in instance.child_plugin_instances %}
<li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li> <li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li>
{% endfor %} {% endfor %}
</ol> </ol>
{% endif %}
<!-- Wrapper for slides --> <!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox"> <div class="carousel-inner" role="listbox">
{% for plugin in instance.child_plugin_instances %} {% for plugin in instance.child_plugin_instances %}