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:
And here is the associated part in the HTML:
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
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