fetch the choosen node of an object relation

Author Message

Andreas Adelsberger

Wednesday 19 December 2007 6:49:44 am

hi there, I need to fetch the choosen node of an object relation attribute.

as far is i looked into the content i can only find the main node and the assigned_nodes, but i need the node that i have choosen in my object relation attribute.

any hints? thanx andi

---------------------------------------
Styleflasher New Media OG
Websites. Games/Multimedia.

André R.

Wednesday 19 December 2007 1:32:26 pm

Object relations are object relations, not node relations. So you normally use the main_node_id of the object, or if you want to make sure it's the correct node assignment you can loop the assigned_nodes array and do some code on it.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 19 2025 18:49:27
Script start
Timing: Jan 19 2025 18:49:27
Module start 'layout'
Timing: Jan 19 2025 18:49:27
Module start 'content'
Timing: Jan 19 2025 18:49:29
Module end 'content'
Timing: Jan 19 2025 18:49:29
Script end

Main resources:

Total runtime1.6008 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.0105 589.2891152.6406
Module start 'layout' 0.01050.0049 741.929739.4766
Module start 'content' 0.01541.5837 781.4063531.2813
Module end 'content' 1.59920.0016 1,312.68758.1250
Script end 1.6008  1,320.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2157160.0002
Check MTime0.00140.0882160.0001
Mysql Total
Database connection0.00160.100010.0016
Mysqli_queries1.533495.7910540.0284
Looping result0.00060.0380520.0000
Template Total1.472092.020.7360
Template load0.00210.131120.0010
Template processing1.469991.819520.7349
Template load and register function0.00010.008110.0001
states
state_id_array0.01190.745610.0119
state_identifier_array0.00280.177720.0014
Override
Cache load0.00160.1030100.0002
Sytem overhead
Fetch class attribute can translate value0.00070.041420.0003
Fetch class attribute name0.00180.112840.0005
XML
Image XML parsing0.00980.614620.0049
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00650.4078230.0003
String conversion0.00000.000840.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
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs