"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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:33:46
Script start
Timing: Jan 18 2025 19:33:46
Module start 'layout'
Timing: Jan 18 2025 19:33:46
Module start 'content'
Timing: Jan 18 2025 19:33:47
Module end 'content'
Timing: Jan 18 2025 19:33:47
Script end

Main resources:

Total runtime1.0739 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0091 587.9141152.6250
Module start 'layout' 0.00910.0041 740.539139.4609
Module start 'content' 0.01321.0592 780.0000530.7500
Module end 'content' 1.07240.0015 1,310.75008.1563
Script end 1.0739  1,318.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3142160.0002
Check MTime0.00140.1258160.0001
Mysql Total
Database connection0.00120.111010.0012
Mysqli_queries1.021895.1455540.0189
Looping result0.00060.0597520.0000
Template Total1.026295.620.5131
Template load0.00210.197820.0011
Template processing1.024095.354920.5120
Template load and register function0.00010.009810.0001
states
state_id_array0.00100.091010.0010
state_identifier_array0.00120.115820.0006
Override
Cache load0.00170.1594160.0001
Sytem overhead
Fetch class attribute can translate value0.00060.059520.0003
Fetch class attribute name0.00100.095140.0003
XML
Image XML parsing0.00140.128620.0007
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00140.1285220.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs