Re: Re: HOWTO: Handle 1:nrelationshiopsbetween Article pubtypes in 0.9.10
"Gomez, Alvaro {PGID~Madrid}" <[email protected]> Tue, 4 Jan 2005 18:21:01 +0100
| Newsgroups | gmane.comp.cms.xaraya.knowledge-base |
|---|---|
| Message-ID | <[email protected]> |
Hi Michael Now I'm able to display parent links on child templates, but my doubt = now is to display child links in parent's template. I tryed with <xar:data-view module=3D"dynamicdata" itemtype=3D"126" />=20 but unsuccessfully. How can I get child ID's before call xarModURL function? Thanks a lot. "Michael Cortez" <[email protected]> escribi=F3 en el mensaje = news:<mailman.1371.1098549337.10659.xaraya_knowledge-base-gn8pmO+6nszQT0dZR+AlfA@public.gmane.org>... > >> Can you post an example about howto use xarModURL() to build > >> links on=20 > >> this items please? > >>=20 >=20 > I usually use something like this: >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > <xar:set=20 > = name=3D"link">xarModURL('articles','user','display',array('aid'=3D>$artic= l > e['aid > '])</xar:set> >=20 > <a href=3D"#$link#">#$article['title']#</a> > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > By using dropdownlist() or getall() or a similar function to get an=20 > array of articles, I use the above code in a for loop like this: >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > <xar:foreach in=3D"$articlesArray" value=3D"$article"> > <xar:set=20 > = name=3D"link">xarModURL('articles','user','display',array('aid'=3D>$artic= l > e['aid > '])</xar:set> >=20 > <a href=3D"#$link#">#$article['title']#</a> > </xar:foreach> > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > May require some minor adjustments depending on which function you use = > to retrieve the articles, as the array of arrays returned may differ=20 > slightly. >=20 > I often use the following to see what I get back: >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > <xar:set=20 > name=3D"$myArray">xarModAPIFunc(..."getall/dropdownlist"...)</xar:set> >=20 > <pre> > <xar:set name=3D"foo">1; > print_r($myArray); > </pre> > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >=20 > Have fun! > -- > Mike C. >=20