Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi All,

I have a page with a list of Testimonials that are added through the admin panel. They are added through cms:repeatable and <cms:show />. Is it possible to paginate these Repeatable regions on the one page. I have around 100 testimonials and would like to limit 6 to each pagination.

My current code is:

Code: Select all
<cms:template title='Guest Book' />

<cms:repeatable name="testimonials" label='Testimonials' >
    <cms:editable name='quote'
       label="Quote"
       type="text" />
           
    <cms:editable name='name'
       label="Name"
       type="text" />

</cms:repeatable>


and

Code: Select all
<cms:show_repeatable 'testimonials' >
<blockquote class="style1"><span><cms:show quote /></span>
<span class="quoteorigin"><cms:show name /></span></blockquote>
<hr class="decorated">
</cms:show_repeatable>


If there is a solution or an alternative way of achieving this I would be grateful for any ones input. I am a beginner to Couch CMS so an idiots guide would be appreciated.
Hi :)

Repeatable-regions are really not meant to work with hundreds of rows and therefore don't support pagination.

Perhaps the 100 testimonials you have right now would be toeing the upper limit.
If you think the number of testimonials would increase with time, you should really use the normal cloned pages approach of Couch (please see our tutorial where 'blog' and 'portfolio' both use this approach - http://www.couchcms.com/docs/tutorials/).

If, however, the number is not likely to increase much beyond what it is at the moment you can continue using repeatable-regions. In which case, I'd suggest you please use a JavaScript library for pagination - a quick search for these on Google will reveal several of them.

Hope this helps.
2 posts Page 1 of 1