Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
So, I want to display several images that can be added through the admin panel using a repeatable feature. However, no images are appearing. In the admin panel, the buttons and upload options are visible, but after saving, nothing happens on the page. I have already tried using an image, and it worked successfully except using "repeatable"

<cms:repeatable name='my_multiple_images' >
<cms:editable type='image' name='my_image' label='Photo' />
</cms:repeatable>
Could you please post a few screen-shots displaying the problem?
yes, these are some screenshot, thanks!, it showed broken image icon,

Attachments

Thanks.

As you would know, there are two aspects in dealing with editable regions in Couch -
1. Define the region (this makes the region show up in the admin-panel, ready for input)
2. Display the value inputted in that region on the front-end

There are two ways of doing that -
1. Place <cms:editable> tag inline with the HTML on the frontend (as you are doing). This handles both the above-mentioned aspects for most editable regions.

2. Place <cms:editable> as a separate entity (within a <cms:template> block placed somewhere at the top of the template) - this fulfills only the 'defining' part. To fulfill the 'displaying' part, we than use <cms:show> at the exact place within the HTML where we wish to show the inputted value.

Problem with repeatable regions is that it not a normal editable region (i.e. not defined using <cms:editable>).
So using the first method mentioned above (i.e. using the definition for display also) will not work with it.

You'll have to use the second method instead.
So, if your template already has a <cms:template> block, please put the definition in there (if not, please create a <cms:template block>).

Your code should now look something like this -
Code: Select all
<cms:template>
    <cms:repeatable name='my_multiple_images' >
        <cms:editable type='image' name='my_image' label='Photo' />
    </cms:repeatable>

</cms:template>

Now you may display the values inputted within the repeatable-regions by placing the following wherever you desire to show the output
Code: Select all
<cms:show_repeatable 'my_multiple_images' >
    <img src="<cms:show my_image />" /> <br/>
</cms:show_repeatable>

Please adjust the names above to match your code.

Hope this helps.
Problem solved, thank you for your help!, you're such an awesome and kind man! :D glad to see you here
Thank you very much indeed for the kind words :)
I am glad I was able to help.
6 posts Page 1 of 1