Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi, it's been a long time since i posted in the forum. But now seeing that Couch has added repeatable regions, I will not use any other CMS in my life!

Speaking of repeatable regions, it was something i wished for before: http://www.couchcms.com/forum/viewtopic.php?f=2&t=4051

Now my question is what is the easiest way to handle something i need with repeatable regions.

For example:
Code: Select all
   <li class="touchcarousel-item">
<a href="#image1" tabindex="1"><img src="images/people-small-1.jpg" width="250" height="150" /></a>      
    </li>


I need both the href attribute to be editable and the image source.

Thanks,
Mirko
hi Mirko, I agree that repeatable regions are a fantastic addition to a fantastic CMS! I have rarely - if ever - been able to post any help in the Couch community - it's usually me asking the questions. But I have used repeatable regions and they are straightforward.

Try the following:

define the editable regions - something like this:
Code: Select all
<cms:repeatable name='carousel_item' label='Add item to carousel here' >
   <cms:editable type='image' name='carousel_image' label='Photo' />
   <cms:editable type='text' name='carousel_href' label='Photo ID' />
</cms:repeatable>

and then use the values like this:
Code: Select all
<cms:show_repeatable 'carousel_item' >
   <li class="touchcarousel-item">
      <a href="<cms:show carousel_href />" tabindex="1"><img src="<cms:show carousel_image />" /></a>
   </li>
</cms:show_repeatable>


The documentation on this is, as ever, fantastically well presented and easy to follow: http://www.couchcms.com/docs/concepts/repeatable-regions.html.

You may also want to define the tabindex value as an editable region.

Good luck!

I'm sure KK or cheesypoof will correct this if I've left anything out.
Thank you Mr. Potato! Just tested now, and it works flawlessly.
The repeatable regions are just perfect.
3 posts Page 1 of 1