Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
I've made a background slider with the Supersized plugin:

http://buildinternet.com/project/supersized/

I want the images to be added by CouchCMS.

Is it possible to use 'repeatable regions' in JavaScript?

I want to use a repeatable region in the following variable:

Code: Select all
slides : [ //Slideshow Images
  {image : 'img/backgrounds/bg1.jpg', title : '<h3>Titel</h3><br><span>onderschrift</span>'},
  {image : 'img/backgrounds/bg2.jpg', title : '<h3>Titel</h3><br><span>onderschrift</span>'},
  {image : 'img/backgrounds/bg3.jpg', title : '<h3>Titel</h3><br><span>onderschrift</span>'},
  {image : 'img/backgrounds/bg3.jpg', title : '<h3>Titel</h3><br><span>onderschrift</span>'},
  {image : 'img/backgrounds/bg3.jpg', title : '<h3>Titel</h3><br><span>onderschrift</span>'}
]

How can I do this?
Hi,

Create a repeatable region (my_slider in this example) with three editable regions - slide_image, slide_title and slide_desc.
Display them as follows
Code: Select all
slides : [ //Slideshow Images
   <cms:show_repeatable 'my_slider' >
   {image : '<cms:show slide_image />', title : '<h3><cms:show slide_title /></h3><br><span><cms:show slide_desc/></span>'}<cms:if k_count lt k_total_records>,</cms:if>
   </cms:show_repeatable>
]

(Notice how we are skipping the comma on the last image)
Does this help?
Yes, that works! Thanks you very much, Kamran! :) I really appreciate your help!
I also tried: "<cms:show_repeatable 'backgrounds' masterpage='globals.php'>" instead of "<cms:pages masterpage='globals.php' >", but that didn't work.

Maybe it can be useful if the 'masterpage' tag also work with the 'repeatable regions'? What do you think?
4 posts Page 1 of 1
cron