relation between object_id and node_id?

Author Message

Nicolas Heiringhoff

Thursday 29 April 2004 6:50:57 am

If I can fetch the object_id of an object I am just editing with

 {$object.id}

, how can I get the node_id that is associated with the object? In other words: is it possible to get the node_id of an object, if I have the object_id, but do not know the node_id, where it is published? Which code can get me the node_id?

Thanks for your help!

http://www.heiringhoff.de

Plamen Petkov

Wednesday 05 May 2004 3:00:26 am

{$node.object|attribute(show)}

Search the resulting page for "node". There you will find attributes of the object giving the info you are looking for.

main_parent_node_id: Integer (perhaps, the first (hence "main") node in the tree pointing to the object; I am not sure)
parent_nodes: Array (of node IDs)
node_assignments: Array (of node IDs)

Why Arrays?
Because: a given object CAN be pointed by more than 1 node; the answer of the question "Which node points to this objects?" is undefined in terms of a single node ID.

regards

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

Main resources:

Total runtime0.0193 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.1484152.6406
Module start 'layout' 0.00700.0034 741.789139.4766
Module start 'content' 0.01040.0060 781.265689.4609
Module end 'content' 0.01640.0029 870.726630.3047
Script end 0.0193  901.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.9762140.0002
Check MTime0.00136.6706140.0001
Mysql Total
Database connection0.00084.109010.0008
Mysqli_queries0.003417.508230.0011
Looping result0.00000.103610.0000
Template Total0.002412.210.0024
Template load0.00147.106210.0014
Template processing0.00105.045510.0010
Override
Cache load0.00094.575410.0009
General
dbfile0.00031.692980.0000
String conversion0.00000.050640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0002 secs