I am just working on the editable regions of the slideshow in the portfolio-tutorial, where each image variable has to be declared manually like so:
So for additonal images, I will have to repeat the above code, which works fine.
But what if the number of images in the slideshow is unknown?
Is there a way to write this a bit more DRY (not repeating the same code again for additional images) without limiting the final number of images?
- Code: Select all
<cms:editable name='group_img1' label='First Image' desc='First Image' type='group' />
<cms:editable
name='image_1'
label='Image 1'
desc='Upload first image here'
crop='1'
width='600'
height='300'
group='group_img1'
type='image'
/>
<cms:editable
name='thumb'
label='Image Thumbnail'
desc='Thumbnail of first image'
width='223'
height='112'
show_preview='1'
assoc_field='image_1'
group='group_img1'
type='thumbnail'
/>
<cms:editable
name='image_1_title'
label='Image Title'
desc='Enter image title here'
group='group_img1'
type='text'
/>
So for additonal images, I will have to repeat the above code, which works fine.
But what if the number of images in the slideshow is unknown?
Is there a way to write this a bit more DRY (not repeating the same code again for additional images) without limiting the final number of images?