To get the exact structure like in the content tree you need at least this in the Order by field: NodeOrder, NodeLevel
. I typically do NodeOrder, NodeLevel, NodeName
to alphabetize them. Using only NodeOrder
will order them no matter what level (1, 2, 3, etc.) so you need to add the NodeLevel
as well so they aren't ordered incorrectly.