Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello amazing people from CouchCMS,

I'm using the latest Couch 2.0 version, so I was just trying to implement the "Manually reorder normal cloned pages" for a Portfolio page (the one who uses orderby='weight' order='asc' and <cms:field 'k_up_down' />.

The output on my backend looks fine — the arrows are showing up — and when I click them the position of the pages change accordingly. But then I check the page and nothing changes. I've tried refreshing every page, cache cleaning... everything.

Sorting only seems to work when I manually edit the Date. What have I missed? I've re-read everything and I just can't get it to work... :(

This is what I have right after <?php require_once( 'couch/cms.php' ); ?>:

Code: Select all
<cms:template title='Projectos' clonable='1'>

<cms:config_list_view orderby='weight' order='asc'>
   <cms:field 'k_selector_checkbox' />
   <cms:field 'k_page_title' sortable='0' />
   <cms:field 'k_page_foldertitle' />
   <cms:field 'k_up_down' />
   <cms:field 'k_actions' />
</cms:config_list_view>

<cms:editable name='titulo' label='titulo' desc='Titulo de projecto' type='text' />
<cms:editable name='ano_projecto' label='Ano' desc='Ano' desc='Ano' type='text' />
<cms:editable name='sinopse' label='Texto' desc='Escrever em baixo' toolbar='basic' type='richtext' />

<cms:editable name='link_para_vertigo' label='Link para Vertigo Gallery' desc='Exemplo: http://www.isabelvincke.com/Vertigo-Gallery/gallery.php?p=12'  type='text' />
</cms:template>   


Thank you so much!
Hi :)

So I gather that the manual sorting *is* working on the backend (i.e. you are able to position the pages as you like). However, on the frontend the positions of the pages do not match those in the backend. Right?

If so, the reason for it would be that you are not sorting the pages on the frontend according to their 'weight', as being done on the backend (the default used for sorting is the publish date, which would explain what you see).

Please add the highlighted parameters to the <cms:pages> block in your template doing the listing -
<cms:pages orderby='weight' order='asc' >

That should match the sort order with that used in the admin-panel.

Hope it helps.
works like a charm! thank you so much :)
I my case I have used "<cms:pages orderby='weight' order='asc' >" in template but still manual sorting is working on the backend. However, on the frontend the positions of the pages do not match those in the backend.

Following is my code

<cms:config_list_view orderby='weight' order='asc'>
<cms:field 'k_selector_checkbox' />
<cms:field 'k_page_title' sortable='0' />
<cms:field 'k_comments_count' />
<cms:field 'k_page_foldertitle' />
<cms:field 'k_up_down' />
<cms:field 'k_actions' />
</cms:config_list_view>

and in template I have used following code
<cms:pages orderby='weight' order='asc' masterpage='productcategorymaster.php' limit='0'>
..........
</cms:pages>

What have I missed? Or have I placed it wrongly.

Thank you so much!
4 posts Page 1 of 1