Image carousel buttons #36728
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@qoietsammy it looks like you're using some templating engine (aspx?) to allow conditionals within your HTML. When using any sort of templating engine (such as Jinja), something to bear in mind is that any component that uses an It's quite possible that since you've got more than 1 carousel item to display, they're all "stacking" perhaps? Tip: {% for foo in foobar %}
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal-{{ forloop.counter }}">
Launch demo modal
</button>
<div class="modal fade" id="modal-{{ forloop.counter }}" tabindex="-1" aria-labelledby="modal-{{ forloop.counter }}-label" aria-hidden="true">
....
</div>
{% endfor %} |
Beta Was this translation helpful? Give feedback.
@qoietsammy it looks like you're using some templating engine (aspx?) to allow conditionals within your HTML.
<% if(campground.images.length > 1) %{>
When using any sort of templating engine (such as Jinja), something to bear in mind is that any component that uses an
id=""
attribute (in your case:id="carouselExampleControls"
) must always be unique. IDs on an HTML page must always be unique, otherwise they won't work properly.It's quite possible that since you've got more than 1 carousel item to display, they're all "stacking" perhaps?
Would you be able to provide a bit more context and code if that doesn't help?
Tip:
something I like to do when in any forloops with a templating engine …