Hey Matteo,

I'm afraid there is no better solution. Pbly also because it's not mandatory 
for all repo implementations to support ordering 
http://www.day.com/specs/jcr/2.0/23_Orderable_Child_Nodes.html

To make the code above more efficient you should use JCR node iterators 
directly rather then iterating over collection of all children. - 
content.getJCRNode().getNodes()  This way you at least avoid getting all 
children in memory at same time.

BTW how is it w/ permissions - some users might not be allowed to see all the 
siblings and then calculated index won't be same for all. Is that ok?

HTH,
Jan

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=c61d27c2-4d7c-4cee-8c36-92d6521d71d6


----------------------------------------------------------------
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