Multi record display order
6 posts by 2 authors in: Forums > CMS Builder
Last Post: Yesterday at 3:44pm (RSS)
By MercerDesign - October 16
I have a multi record list and all the records are listed alphabetically in the CMS in the correct order but on the page they are not displaying in the same order. How can I fix this? This is the page: https://worthschool.co.uk/activities-clubs-societies/
By Dave - October 16
Hi MercerDesign,
In your getRecords() call you can add this option:
'orderBy' => 'lastName DESC', // optional, defaults to $_REQUEST['orderBy'], or table sort order
Just replace "lastName" with the column you want to sort on, and if you don't want it in descending (reverse) order, remove "DESC".
Let me know if that works for you.
interactivetools.com
By MercerDesign - October 23
Thank you, this works up to articles that start with the letter "G", if you look at this page (https://worthschool.co.uk/activities-clubs-societies-test.php) and scroll down, it starts to go wrong from "G" onwards.
By Dave - Friday at 12:59pm
Hi MercerDesign,
Can you check when you view source on the page are the articles in the correct order there?
interactivetools.com
By Dave - Yesterday at 3:44pm
Hi MercerDesign,
All PHP can do is generate the page source, so if they're in the correct order in the source, but not in the correct order when displayed, something is re-ordering them after the page is loaded.
I'd check any JavaScript libraries or CSS that might be overriding the order. Or try temporarily disabling any CSS or JavaScript libraries to find the cause.
Hope that helps!
interactivetools.com