Items in Repeater isn't matching the sort order in CMS Desk

Dcode warner asked on August 11, 2017 23:15

I thought we didn't need nodeOrder for regular repeater's ORDER BY expression? Either way, the sort order isn't reflecting on the front page. Either way, I've added the nodeOrder, nodeLevel and nodeName all give weird results. For some reason the most recent item in the CMSDesk, is showing as the last item on the front end. Tried creating a new repeater, even tired a universal viewer. What's going on? Have anyone ever had this situation?

Recent Answers

Brenden Kehren answered on August 12, 2017 05:41

The proper order by syntax to get it to look like it is in the content tree is

NodeLevel, NodeOrder, NodeName

3 votesVote for this answer Mark as a Correct answer

Bryan Johnson answered on September 1, 2017 23:57

Normally using the sort logic recommended by Brenden is ideal. But, be careful if you are pulling items across multiple branches of the content tree. Its possible to target items in separate branches that are all of the same NodeLevel. When this happens, using "NodeLevel, NodeOrder, NodeName" will result in items being mixed together from separate branches. In these cases, you may have to use more than one repeater to target each branch separately, or write a custom query and use it in a SQL data source, or fall back to some other logic, like "NodeLevel, DocumentNamePath" which would essentially sort each level by their alphabetized breadcrumbs.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.