Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello, I'm trying to set up my image gallery to show the contents of a named folder in one html page, and another folder in another page. So far I have added this to the top of each page…

<cms:template title='Gallery' clonable='1' dynamic_folders='1' gallery='1' >
<cms:editable
name="gg_image"
label="Image"
desc="Upload your main image here"
width="500"
show_preview='1'
preview_height='200'
type="image"
/>
<cms:editable
name="gg_thumb"
assoc_field="gg_image"
label="Image Thumbnail"
desc="Thumbnail of image above"
width='200'
height='200'
enforce_max='1'
crop='1'
type="thumbnail"
/>
</cms:template>


and this where I want the contents of a folder displayed….

<cms:pages masterpage="props.php" include_subfolders='0' k_folder_name="category-1" >
<a href="<cms:show k_page_link/>" class="transition">
<img src="<cms:show gg_thumb/>" alt="<cms:show image_alt/>"/>
</a>
</cms:pages>


Can someone tell me what I'm doing wrong?

Many Thanks

Rob
Hi :)

I think the problem is the highlighted parameter below -
<cms:pages masterpage="props.php" include_subfolders='0' k_folder_name="category-1" >

It should actually be -
<cms:pages masterpage="props.php" include_subfolders='0' folder="category-1" >

Details of all parameters used by <cms:pages> can be found here - http://docs.couchcms.com/tags-reference/pages.html

Hope it helps.
Hi, Rob
you have this line
Code: Select all
<img src="<cms:show gg_thumb/>" alt="<cms:show image_alt/>"/>

But i didn't see you set up this editable in your template: image_alt
Make sure you have it, else nothing would be displayed here (only alt=""):
Code: Select all
alt="<cms:show image_alt/>"

I would suggest, for example, this:
Code: Select all
alt="<cms:show k_page_title />"

You'd have many clonable pages (images). Each would have a title, of course, taken from the name of the image file automatically. On upload to a gallery, couch creates a clonable page out of each image. So, titles can be used as alts without any problem. Very handy if your files are properly named, ex: village.jpg instead of 01.jpg.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Many Thanks all! :)
4 posts Page 1 of 1