Re: HOWTO: Handle 1:n relationshiops between Article pubtypes in 0.9.10

[email protected] (mikespub) Thu, 23 Sep 2004 14:16:17 GMT
Newsgroups gmane.comp.cms.xaraya.knowledge-base
Organization not much
Message-ID <[email protected]>
In article <[email protected]>, =?ISO-8859-1?Q?Michael_H=E4rtl?= 
<[email protected]> wrote:
>...
>We'll use a DD object to hold the child article id's. Then we create a 
>link between this object and the parent article with subitems.
>...

Actually you don't need to use the subitems module here, if you extend
the Child to point back to the Parent, instead of extending the Parent to
point to all Children. This was first explained by Michael Cortez [insert
reference here].

So you use a dropdown field in your Child pubtype, that you populate with
the available parent ids/titles, and then adapt the Parent and Child templates
to show the parent-child relationship based on DD and articles API calls.

Of course using the subitems module gives you the options to attach a
child to more than 1 parent, and it gives you some pre-defined child
output via hooks, so it has its advantages too :-)

Mike.