Sorting Order by
7 posts by 3 authors in: Forums > CMS Builder
Last Post: February 5, 2010 (RSS)
Please can you tell me where I'm going wrong?
Thanks!
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Re: [NigelGordijk] Sorting Order by
By Dave - February 4, 2010
Try this:
dragSortOrder DESC, date DESC
Note that this will reverse your current order.
Let me know if that works for you.
interactivetools.com
Re: [Dave] Sorting Order by
It doesn't seem to be reflected on the live page: http://66.7.208.127/~harolda1/newsPhotos.php
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Re: [NigelGordijk] Sorting Order by
By Dave - February 4, 2010
Does the live page have a custom orderBy option in the viewer code?
interactivetools.com
Re: [Dave] Sorting Order by
Do you have an example of what this looks like and where it should go in the code?
Cheers,
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net
Re: [NigelGordijk] Sorting Order by
By Chris - February 5, 2010
A custom orderBy options looks like this:
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'orderBy' => 'title',
));
If you have a line like that in your viewer code, it will override your section's default order. Simply remove that line and you'll get the same sort order as in the CMS Builder interface.
I hope this helps! Please let us know if you have any questions.
Chris
Re: [chris] Sorting Order by
I tried the following, which does exactly what I need.
list($news_room_photo_galleryRecords, $news_room_photo_galleryMetaData) = getRecords(array(
'tableName' => 'news_room_photo_gallery',
'perPage' => '5',
'orderBy' => 'date DESC',
));
Many thanks for your help.
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net