Michel de Bree <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I try to sort related objects by their position, but I must be doing 
> something wrong... this is the code I use:
> 
> <mm:node number="examplebook">
>       <mm:related
>               path="posrel,pages"
>               orderby="posrel.pos"
>               fields="pages.title,pages.number,posrel.pos"
>               directions="DOWN">
> 
> .. etc
> 
> But they seem to be coming out in random order. The funny thing is that 
> when I reverse the sorting order to UP, the order is the other way 
> around, so it does seem to sort on something...

> 
> I must be making some silly mistake... I am using MMBase 1.7

I don't see it right away either. You could try to switch on query-logging,
which will normally clarify the problem immediately.

Perhaps it would have been easier to use <mm:relatednodes role="posrel"
type="pages" orderby="posrel.pos">, which also works in MMBase 1.7 You don't
need the 'fields' attribute then, and you have 'real' nodes. The
disadvantage is that the value of posrel.pos itself is not readily available
anymore...



 Michiel

-- 
Michiel Meeuwissen                  mihxil'
Mediacentrum 140 H'sum                [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US




Reply via email to