Forum
Repeating Regions with Bootstraps Carousel
I would like to create a repeating region from the code below:
<div class="item active">
<div class="carousel-span"></div>
<div class="carousel-caption">
<?php perch_content('Neuigkeiten 1'); ?>
</div>
</div>
<div class="item">
<div class="carousel-span"></div>
<div class="carousel-caption">
<?php perch_content('Neuigkeiten 2'); ?>
</div>
</div>
<div class="item">
<div class="carousel-span"></div>
<div class="carousel-caption">
<?php perch_content('Neuigkeiten 3'); ?>
</div>
</div>
Unfortunately, the very first item has a extra class of "active". So how could I turn this in to a repeating region?
You can test for the first item with
This method won't work, because the "active" class jumps dynamically thru every slide. Anyway, I'm fine with the three different perch_contents ...
That's done with JavaScript once the page has loaded, though, isn't it?
Yes, its a Bootstrap thing
... or is there an workaround to display all three perch_contents on one site in the admin panel?
So you should be able to have this template, for a multiple item region:
YOU ARE THE MAN! :)