Forums / Developer / fetch the choosen node of an object relation

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

eZ debug

Timing: Jan 20 2025 20:14:45
Script start
Timing: Jan 20 2025 20:14:45
Module start 'content'
Timing: Jan 20 2025 20:14:45
Module end 'content'
Timing: Jan 20 2025 20:14:45
Script end

Main resources:

Total runtime0.0245 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 588.9766180.8125
Module start 'content' 0.00800.0064 769.789193.8359
Module end 'content' 0.01440.0100 863.625070.7031
Script end 0.0244  934.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00218.6585120.0002
Check MTime0.00103.9536120.0001
Mysql Total
Database connection0.00073.012410.0007
Mysqli_queries0.005823.717440.0015
Looping result0.00000.081820.0000
Template Total0.009739.410.0097
Template load0.00083.265410.0008
Template processing0.008936.132910.0089
Override
Cache load0.00062.319410.0006
General
dbfile0.005622.8814100.0006
String conversion0.00000.029230.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs