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 }})">
|
<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 %}
|
||||||
|
|
Loading…
Reference in a new issue