Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
Hi

I have couchcms in a website and is in a gallery page as they want to add their own photos but the photos page is not a normal gallery, the photos have polaroid effect and are scattered like they have been thrown down on a table, is it possible to use couchcms still so they can add their own photos, the link is below to see what I mean

http://www.vibentertainment.co.uk/photobooth-hire.php

Thank you in advance
You can create a repeatable region with just an image editable inside it. You could then show this repeatable on the page to output the image into whatever repeated HTML tags you want. Looks like a simple list, so would be something similar to:
You would define the repeatable like so:
Code: Select all
<cms:repeatable name='my_multiple_images' >
    <cms:editable type='image' name='my_image' label='Photo' />
</cms:repeatable>

To show the images on the front-end:
Code: Select all
<cms:show_repeatable 'my_multiple_images'>
<li><a href="" title="Photobooth Hire"><img src="<cms:show my_image />" /></a></li>
</cms:show_repeatable>


Example is taken from docs: http://docs.couchcms.com/concepts/repeatable-regions.html with your HTML inserted into the <cms:show_repeatable>.

Should be quite straightforward for the client to add and delete or sort the images in the repeatable.

Hope this helps, let me know.
Dave
Image
Hi, polaroid effect is achieved via some script over <ul><li> list.
Code: Select all
    <li><a href="" title="Photobooth Hire"><img src="images/photobooth/booth1.png" /></a></li>
    <li><a href="" title="Photobooth Hire"><img src="images/photobooth/booth2.jpg" /></a></li>
    <li><a href="" title="Photobooth Hire"><img src="images/photobooth/booth5.jpg" /></a></li>
    <li><a href="" title="Photobooth Hire"><img src="images/photobooth/booth6.jpg" /></a></li>


There is zero problem to make this list as couch-managed gallery using standard approach as in Photo Gallery template (useful for bulk-import) http://couchdocs/concepts/photo-gallery.html
Hi

Thank you for the replies, appreciate it

I have added the repeatable coding in and uploaded the images from the couch cms admin side but on the front end they are now displayed, below is the coding I have

Code: Select all
<?php require_once( 'cms/cms.php' ); ?>

<cms:template title='Photobooth Hire'>

<cms:repeatable name='my_multiple_images' >
    <cms:editable type='image' name='photobooth_images' label='Photo' />
</cms:repeatable>

<cms:editable name='page_title' label='title' type='text' />
</cms:template>

<title><cms:show page_title/></title>


Code: Select all
<ul class="pics">
    <cms:show_repeatable 'my_multiple_images'>
    <li><a href="" title="Photobooth Hire"><img src="<cms:show photobooth_images />" /></a></li>
    </cms:show_repeatable>
    </ul>
Did you upload the images into the admin panel repeatable region?

Looking at the source code, it seems to have repeated the code for the amount of rows you probably have in your repeatable table in the admin panel, but the image sources are empty. Your editable region and <cms:show> both look correct regarding names and type, have you uploaded the images in the admin panel? Can you screenshot the admin panel as well as paste your full template code here.
Image
it seems ok now, I refreshed the admin side and the images disappeared and asked me to permanently delete a section on the admin side and then I just added the images in again and seems ok now
6 posts Page 1 of 1

Who is online

In total there are 11 users online :: 0 registered, 0 hidden and 11 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 11 guests

cron