Forums / Setup & design / node_id, object_id, idontgetit_id

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

eZ debug

Timing: Jan 18 2025 04:25:45
Script start
Timing: Jan 18 2025 04:25:45
Module start 'content'
Timing: Jan 18 2025 04:25:46
Module end 'content'
Timing: Jan 18 2025 04:25:46
Script end

Main resources:

Total runtime1.6056 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.8438180.8359
Module start 'content' 0.00631.4405 769.6797561.8594
Module end 'content' 1.44680.1586 1,331.5391337.3984
Script end 1.6055  1,668.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2591210.0002
Check MTime0.00170.1052210.0001
Mysql Total
Database connection0.00080.046910.0008
Mysqli_queries1.518994.60251990.0076
Looping result0.00230.14021970.0000
Template Total1.571697.920.7858
Template load0.00200.127420.0010
Template processing1.569597.755520.7848
Template load and register function0.00020.012410.0002
states
state_id_array0.00110.066310.0011
state_identifier_array0.00130.078220.0006
Override
Cache load0.00170.1073340.0001
Sytem overhead
Fetch class attribute can translate value0.00220.139040.0006
Fetch class attribute name0.00100.064750.0002
XML
Image XML parsing0.00100.060340.0002
class_abstraction
Instantiating content class attribute0.00000.000650.0000
General
dbfile0.00250.1575270.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs