node_id, object_id, idontgetit_id

Author Message

padEE Scherer

Wednesday 11 June 2003 1:13:15 am

i'm lost. i've read the docs, the forum messages, but nowhere is explained, which id is assigned how to which object oder which node.
example: in the site.ini for demo you'll find the following:

[SiteSettings]
IndexPage=/content/view/full/26

but the only number equals to 26 you'll find in the admin section is in 'set up > classes > media' the file object.
so, i quess, 26 is the node number. alright, but where do i specify this node number? where can i check this number?

if i define a new object with new views... how are the nodes assigned to it?

cheers,
padEE

Gunnstein Lye

Wednesday 11 June 2003 3:03:00 am

Just to make this clear: object_id is the ID of the object. node_id is the ID of one of the nodes of an object. A node is a placement in the content tree.

When you view an object, you view it from a certain location (placement), so the number after /content/view/full/ is the node id. When editing an object, the nodes are irrelevant, so the number after /content/edit/ is the object id.

You can not specify node ids, the system does that. How to find the node id of a given node? Look at the link, the node id is the number after /content/view/full/.

Nodes are assigned whenever you specify locations for an object.

Chris Winchester

Wednesday 13 August 2003 10:26:58 am

I'm having some trouble with the object_id / node_id thing.

I'm building a PHP extension which needs to retreive those objects which are parents of a particular content object. The parent_nodes attribute gives me a list of their node_id's, but the eZContentObject::fetch function which I need to use to retrieve the content of these objects requires object_ids.

Is there anyway to use eZContentObject::fetch or something similar with node_ids instead, or is there some way to map node_ids to object_ids?

Any help would be much appreciated - thanks!
- Chris

Chris Winchester

Thursday 14 August 2003 4:39:21 am

iDOgetit_id!!

Glad I slept on this. I've just made a bit of a breakthrough in understanding how this works.

I was using eZContentObject::fetch($object_id) but I didn't realise I could use eZContentObjectTreeNode::fetch($node_id) to get straight to the requried node. You can then retreive the associated content object id using:

$wantedNode = eZContentObjectTreeNode::fetch($node_id);
$wantedObjectID = $wantedNode->attribute('contentobject_id');
$wantedObject = eZContentObject::fetch($wantedObjectID);

It's very simple once you know how - just really difficult to find what you need amongst all the available functions etc.

I do love eZpublish, but it can be a bit frustrating at times!!

- Chris

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 10:53:14
Script start
Timing: Jan 18 2025 10:53:14
Module start 'layout'
Timing: Jan 18 2025 10:53:14
Module start 'content'
Timing: Jan 18 2025 10:53:16
Module end 'content'
Timing: Jan 18 2025 10:53:16
Script end

Main resources:

Total runtime1.7258 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9141152.6250
Module start 'layout' 0.00610.0055 740.539139.4609
Module start 'content' 0.01161.7126 780.0000556.7813
Module end 'content' 1.72420.0016 1,336.781312.1563
Script end 1.7258  1,348.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.2022160.0002
Check MTime0.00150.0885160.0001
Mysql Total
Database connection0.00060.034310.0006
Mysqli_queries1.660996.2362620.0268
Looping result0.00080.0491600.0000
Template Total1.669896.820.8349
Template load0.00190.111620.0010
Template processing1.667996.641620.8339
Template load and register function0.00010.008310.0001
states
state_id_array0.00240.139810.0024
state_identifier_array0.00180.101520.0009
Override
Cache load0.00170.0971340.0000
Sytem overhead
Fetch class attribute can translate value0.00090.052830.0003
Fetch class attribute name0.00120.067450.0002
XML
Image XML parsing0.00200.116530.0007
class_abstraction
Instantiating content class attribute0.00000.000650.0000
General
dbfile0.00430.2493160.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs