Forums / Setup & design / Object relations / Comment20284
John Mina
Sunday 05 March 2006 6:06:47 am
Hi, the example explained above is very easy and nice, Now i was trying to do fetching to all articles children of current node.And if any of them has a related article attached to it, i want to show a link to it on the front page.
But I failed doing that.here is my code
{section var=a loop=$ar} <h2><a href={$a.url_alias|ezurl}>{$a.name}</a></h2> <p><a href={$a.url_alias|ezurl}><img src={$a.data_map.folder_pic.content.medium.url|ezroot} width="95px" border="0" align="right" hspace="3px"></a>{$a.data_map.intro.content.output.output_text}</p> {let related_objects=$a.data_map.related_contentobject_array} {section show=$related_objects} <ul> {section name=ContentObject loop=$related_objects show=$related_objects} <li><a href={$ContentObject:item.main_node.url_alias|ezurl}>{$ContentObject:item.name}</a></li> {/section} </ul> {/let} {/section}
Can any one help ?