Forums / Setup & design / Displaying a related object from an XML-field.

Displaying a related object from an XML-field.

Author Message

Bjørn Kaarstein

Wednesday 02 April 2003 12:52:06 am

I have created an article-class which contains an XML-field. I have created an image and related it to the article, and pasted the code in the XML-field. (<object id='26' />)

I'm trying do display the XML-field like this:

{let var=fetch('content','node',hash(node_id,28))}
{$var.object.data_map.innhold.content.output.output_text}
{/let}

This displays the text, but not the related image ...

Any suggestions?

Regards Bjørn Kaarstein

Jan Borsodi

Wednesday 02 April 2003 10:49:40 pm

The object relation in the xml fields uses the embed view for content objects, this means that you need to create override templates for embed.tpl for the various classes you create.

See design/standard/templates/content/view/embed.tpl for the original embed template, and design/admin/override/templates/content/view/embed_class_5.tpl for an example template for the image class which is bundled with the kernel clean setup.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq