Henk Hangyi <[EMAIL PROTECTED]> wrote:
> Hi Ignacio,
>
> MMBase uses the posrel relation for this purpose. The posrel is a
> relation with an integer field.
>
> Instead of connecting author to document by using an insrel (= related),
> you connect autors to documents with a posrel. If you use JSP and the
> taglib you get something like:
>
> <mm:import externid="author" />
> <mm:node number="$author" notfound="skipbody">
> <mm:related path="posrel,documents" orderby="posrel.pos"
> directions="UP">
> <mm:node element="documents">
> ....
> </mm:node>
> </mm:related>
> </mm:node>
In 1.7 syntax that could be done nicer:
<mm:node number="$author">
<mm:relatednodes type="documents" role="posrel" orderby="posrel.pos"
directions="UP">
....
</mm:relatednodes>
</mm:node>
In order words, no need to use element="document" in these cases, which
looks nicer, and would be more efficient for the database too.
Michiel
--
Michiel Meeuwissen
Mediacentrum 140 H'sum
+31 (0)35 6772979
nl_NL eo_XX en_US
mihxil'
[] ()