Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I am in the process of converting one site to Couch, nothing fancy, just a few repeatable regions and that is it.
But I stumbled on the first hurdle, maybe I don't see something obvious, because I was working for the last 36 hours to meet the deadline.

Anyway, I want a simple repeatable region, with text input and one image type+thumbnail.
Here is the code in the template tag:
Code: Select all
<cms:template title='Main Page'>
<cms:repeatable name="portfolio_item" label="Add new portfolio item">
        <cms:editable name='choose_category' label='Category' desc='Choose portfolio category' type="text" input_width='300'/>
       <cms:editable name='big_image' label='Big Image' desc='Choose portfolio big image' type="image" input_width='300'/>
       <cms:editable name='big_image_thumb' label='Image Thumbnail' desc='Thumbnail of main image' width='150' show_preview='1' assoc_field='big_image' type='thumbnail'/>
    </cms:repeatable>
   
</cms:template>


And here is the associated part in the HTML:
Code: Select all
   <!-- Begin Editable Portfolio Item -->
<cms:show_repeatable 'portfolio_item'>
         <div data-category="<cms:show choose_category />">
                        <a href="<cms:show big_image/>" rel="lightbox[on]" title=""><img    src="<cms:show big_image_thumb/>"/></a>
                           </div>
                           </cms:show_repeatable>


For this code I get two fields, Category and Big Image. I get no descriptions, and I don't get the thumbnail image. I think I made everything ok, but then again, I am awake for almost 36 hours, so it may be that I don't think very vell anymore :D
Hi,

As the documentation of repeatable region (http://www.couchcms.com/docs/concepts/r ... gions.html) states:
'richtext' and 'thumbnail' type editable regions do not support getting repeated.
However, both have alternatives.
You can use the 'thumbnail' tag (please see http://www.couchcms.com/docs/tags-refer ... ail-1.html) in place of the 'thumbnail' region.

As for the description, it is ignored as really space is a scarce commodity when it comes to repeatable regions.
What I usually do is, use an editable region of type 'message' just above the repeatable regions to explain to the client what the various columns below mean. You can put any HTML within 'message' so you can format it any way you like.

Hope this helps.
KK, helpful as always. Thanks for clearing things up!
3 posts Page 1 of 1