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 -->
<ol class="carousel-indicators"> {% if instance.child_plugin_instances|length > 1 %}
{% for plugin in instance.child_plugin_instances %} <ol class="carousel-indicators">
<li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li> {% for plugin in instance.child_plugin_instances %}
{% endfor %} <li data-target="#carousel-header-ungleich" data-slide-to="{{forloop.counter0}}" {% if forloop.counter0 == 0 %}class="active" {% endif %}></li>
</ol> {% endfor %}
</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 %}