Forums / Setup & design / "Object relation" url raw output

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

"Object relation" url raw output

Author Message

Andreas Kaiser

Tuesday 23 January 2007 2:43:05 am

I have created a content class with a "Object relation" datatype. Now in the template I want to link to the related object, and I don't get it. My code is following:

		{def $header=fetch( content, list, hash( 'parent_node_id', 399, class_filter_type, "include", class_filter_array, array(23), limit, 5, 'sort_by', array( 'priority', true() ) ) ) }
		{foreach $header as $item}
			<div class="imageElement">
				<h3>{$item.name|wash()}</h3>
				<p>{$item.object.data_map.intro.content}</p>
				<a href=?????? title="{$item.object.data_map.intro.content}" class="open"></a>
				<img src="{$item.object.data_map.image.content.data_map.image.content[header].full_path}" alt="{$item.name|wash()}" title="{$item.name|wash()}" class="full" />
			</div>
		{/foreach}
		{undef $header}

So my question is how to code this line to link the image to the related object.

<a href=?????? title="{$item.object.data_map.intro.content}" class="open"></a>

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

paul bolger

Monday 26 March 2007 11:38:11 pm

Hi Andreas,

Just spent an hour banging my head against a wall trying to find this, and came across your post in the process.

The answer is in

http://ez.no/community/forum/developer/link_to_the_related_object_attribute

and it's something like this:

<a href="{$related.main_node.url_alias|ezurl}"></a>

Paul Bolger