[Cubicweb] Reciprocal Relations
nicolas.chauvat at logilab.fr
Sun Dec 12 22:55:21 CET 2010
On Sun, Dec 12, 2010 at 06:54:38PM +0000, Fletcher, John P wrote:
> I very much appreciate the symmetrical relation 'see also' which creates both links.
Actually there is only one relation, but it can be read both ways.
> I would be very interested if there was an implementation of a reciprocal pair relation e.g. parent/child
> where creation of one implied a reciprocal one in the other direction.
Let's take X parent Y
1/ you could create 'Y child X' using hooks
2/ you could simply fix the translation messages in order to display
'child' when the message says 'parent_object'.
I would use 2/, for maintaining consistency of 1/ is probably too much
work for what it buys you.
Or... wait for 3/ a rule system implemented in cubicweb
But 3/ is certainly not before version 4.0 is open for development
some time in early 2011 :)
logilab.fr - services en informatique scientifique et gestion de connaissances
More information about the Cubicweb