Show carousel indicators only if we have more than 1 item
This commit is contained in:
parent
db4362af01
commit
f4b252ff09
1 changed files with 7 additions and 6 deletions
|
@ -2,12 +2,13 @@
|
|||
<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}}">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
{% if instance.child_plugin_instances|length > 1 %}
|
||||
<ol class="carousel-indicators">
|
||||
{% 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>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="carousel-inner" role="listbox">
|
||||
{% for plugin in instance.child_plugin_instances %}
|
||||
|
|
Loading…
Reference in a new issue