[quote]> Does anybody know what I'm doing wrong? I tried to change field 
name, remove the '@', change ascending to descending with no result :(

The query is returning the nodes you want in the wrong order or simply
nothing?
If the order doesn't change when using ascending or descending, this
means that is not even trying to sort. My idea is that the nodes
returned in the query are not exactly the ones you expect, I'd suggest
to change the query like this:

/jcr:root/iphone/untitled/p-main/verticalLayout/_x0030_/scheduledBox//element(*,
mgnl:contentNode)[(@sortOrder)]  order by  @sortOrder ascending

Forcing a non-null "sortOrder" attribute in the results may help the sorter.

Another try I'd like to do in this case is to try ordering on a String
attribute. I noticed from the screenshots that you are ordering on a
Long typed attribute, maybe your version of Jackrabbit/Lucene (or your
configuration) is old enough to order only on indexed attributes (strings).

Regards, Danilo.[/quote]

Hi Danilo,
you helped me to solve the problem, I don't know why but my nodes were 
different from the ones shown in magnolia repo browser!
I checked with the query you sent me and only one node had @sortOrder != null, 
so I removed the page and created it again from scratch, now my query is 
working.

Grazie mille!!

Daniele

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=bde8b078-2d57-4640-8c43-01671fa5a27f


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to