Do you have some feature in mind that you'd love to see in Couch? Let us know.
3 posts Page 1 of 1
hi all, i have a question, didn't found at manual and at forum
in template i have:

Code: Select all
   <cms:repeatable name='lessons' >
       <cms:editable type='text' name='lesson_date' label='Lesson date' />
       <cms:editable type='text' name='lesson_nr' label='Lesson name' />
       <cms:editable type='text' name='lesson_name' label='Lesson description' />
       <cms:editable type='text' name='lesson_description' label='Lesson description' />

in output as a default i have
Code: Select all
<cms:show_repeatable 'lessons' >
   <cms:show lesson_date /> <br>
   <cms:show lesson_nr /> <br>
   <cms:show lesson_name /> <br>
   <cms:show lesson_description /> <br>

question is:

how to get lessons by lesson_nr as numeris 1,2,3,4,5 or 5,4,3,2,1

Code: Select all
<cms:show_repeatable 'lessons' orderby='lesson_nr' order='asc'>

or by lesson_name by A-Z or Z-A

Code: Select all
<cms:show_repeatable 'lessons' orderby='lesson_name' order='asc'>

and what about limit? like i want to show at main page from other masterpage for example:
Code: Select all
<cms:pages masterpage='lessons.php'>
<cms:show_repeatable 'lessons' orderby='lesson_date' order='desc' limit='5'>
Sorry to bring the bad news and the good news, don't kill the messenger :) A little forum search shows a numerous of topic about the matter. ... .com/forum

Repeatables were meant to be sorted manually in backend by drag and drop. For any serious data-operations (and sorting-ordering-limiting are considered as serious) please use cloned pages.

Technically it is possible to put all values into php array and use native php functions to sort that array and output a limited number of keys.
I agree with trendoman cloned pages a way better for this. That said if you don't want to start all over again, you could try to output a json make an ajax call on this and preform some filtering with javascript.
I load frameworks and write bugs on top of them, after that I rearrange the code so that it looks like a cool product.
3 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest