I've been playing around with Repeatable Regions for a new site I am building based on Twitter Bootstrap, and I managed to get the image carousel feature working using them.
In case it may help anyone else, the example code is below.
Regards,
Mark
And the code that defines the repeatable regions is:
In case it may help anyone else, the example code is below.
Regards,
Mark
- Code: Select all
<div id="mycarousel" class="carousel">
<div class="carousel-inner">
<cms:show_repeatable 'gallery'>
<cms:if k_count=='1'>
<div class="item active">
<cms:else />
<div class="item">
</cms:if>
<img src="<cms:show work_picture/>" alt="">
<div class="carousel-caption">
<h4><cms:show picture_title/></h4>
<p><cms:show picture_description/></p>
</div>
</div>
</cms:show_repeatable>
</div>
<a class="left carousel-control" href="#mycarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#mycarousel" data-slide="next">›</a>
</div>
And the code that defines the repeatable regions is:
- Code: Select all
<cms:repeatable name="gallery">
<cms:editable type="image" name="work_picture" label="Photo" show_preview='1' preview_width='150' input_width='200' col_width='250' />
<cms:editable type="text" name="picture_title" label="Picture Title"/>
<cms:editable type="textarea" name="picture_description" label="Picture Description"/>
</cms:repeatable>