Get the node id from a new content object?

Author Message

Nicklas Lundgren

Thursday 10 August 2006 6:29:50 am

Hi,

I am working on an import script. As part of the process, I need to get hold of the node id of a newly created and published content object.

Thus, I do have the contentObject, which I have runned the store() operation on.
This contentObject has also been published successfully by using the eZOperationHandler.

But now, I would like to know the node id of this newly created object.

Of course this must be possible. But how?

All help appreciated!

Best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

Nicklas Lundgren

Thursday 10 August 2006 7:02:33 am

Hi again,

No worries, I found it to be really easy:

$ContentObject->attribute('main_node_id')

Cheers,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

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 31 2025 04:30:47
Script start
Timing: Jan 31 2025 04:30:47
Module start 'layout'
Timing: Jan 31 2025 04:30:47
Module start 'content'
Timing: Jan 31 2025 04:30:47
Module end 'content'
Timing: Jan 31 2025 04:30:47
Script end

Main resources:

Total runtime0.0172 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.2656151.2266
Module start 'layout' 0.00610.0031 739.492236.6797
Module start 'content' 0.00920.0064 776.171990.3125
Module end 'content' 0.01560.0016 866.484429.9922
Script end 0.0172  896.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002816.1985140.0002
Check MTime0.00126.9851140.0001
Mysql Total
Database connection0.00084.554810.0008
Mysqli_queries0.003118.002130.0010
Looping result0.00000.087110.0000
Template Total0.00116.610.0011
Template load0.00095.341910.0009
Template processing0.00021.189510.0002
Override
Cache load0.00073.846610.0007
General
dbfile0.00169.223180.0002
String conversion0.00000.040140.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.0001 secs