Re: HOWTO: Handle 1:n relationshiopsbetween Article pubtypes in 0.9.10

"Manosucias" <[email protected]> Tue, 4 Jan 2005 18:28:53 +0100
Newsgroups gmane.comp.cms.xaraya.knowledge-base
Organization Xaraya
Message-ID <[email protected]>
Hi all.

Now I'm able to display parent links in child templates, but how can I put
child links in parent articles?

I tryed to get child article's ID's with

<xar:set name="where">'ficha eq '.$aid</xar:set>
   <xar:data-view module="dynamicdata" itemtype="126" where="$where" />

"126" is my dd itemtype and "ficha" the field name wich contains parent
ID's.

Any clues?
Thanks a lot
"Michael Cortez" <[email protected]> escribió en el mensaje
news:mailman.853.1097561584.10659.xaraya_knowledge-base-gn8pmO+6nsymdvSpIQae8A@public.gmane.org
> >> This sounds like just what I am looking for.  Can someone
> >> point me to
> >> the original Michael Cortez explanation referenced here?
> >>
>
> Hrm, I used to be able to find references to it using google -- but now I
> can't find it.
>
> Looks like it's time for me to write it up again.
>
> The brief summary (for advanced user's that will understand my
short-hand):
>
> 1. Add a "ParentID" field to the child pubtype using the DD List property
>
> 2. Populate that list using
xarModAPIFunc('articles','user','dropdownlist',
> array('ptid'=>9)), where '9' is the pubtype id of the parent
>
> 3. In the display template of child, use the articles api function for
> generating a link to the parent article
>
> 4. In the display template of the parent, use DD's getitems() function to
> get a list of the children, and then use xarModURL() to build links to
them.
>
>
> I'll try to find another copy of my easier to understand steps and post
it,
> or post a URL to someone elses copy of it.
>
> --
> Mike C.
>