Getting the node_id asigned to the node once created!

Author Message

Jorge estévez

Monday 18 July 2005 12:50:04 am

If I asign a new location for the contents of a node, How can I "get" the original node_ID for that node?

I mean, the node has a node_id once created but when located on another place it will also have another node_id (not beeing the original node_id)

I would like to ther the node_id once it was created!

thanks!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

David Eriksson

Monday 18 July 2005 2:34:42 am

If you kept the original location as main, you can use $node.main_node_id.

/David

Jorge estévez

Monday 18 July 2005 2:48:53 am

Hi David,

What do you mean by "If you kept the original location as main"...

thanks!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

David Eriksson

Monday 18 July 2005 3:47:38 am

Out of all the locations for an object, there is one that is designated "Main". If you add new locations using PHP code, you can choose if the new location should be made Main or not. If you just add locations through the admin interface, the original location should stay Main unless you decide to change it, after the new location has been added.

/David

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 05:34:32
Script start
Timing: Jan 31 2025 05:34:32
Module start 'layout'
Timing: Jan 31 2025 05:34:32
Module start 'content'
Timing: Jan 31 2025 05:34:32
Module end 'content'
Timing: Jan 31 2025 05:34:32
Script end

Main resources:

Total runtime0.0175 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.0064 588.2813151.2266
Module start 'layout' 0.00640.0032 739.507836.6797
Module start 'content' 0.00970.0063 776.187589.9844
Module end 'content' 0.01600.0015 866.171933.9922
Script end 0.0174  900.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002816.2711140.0002
Check MTime0.00137.6104140.0001
Mysql Total
Database connection0.00105.543710.0010
Mysqli_queries0.002615.009330.0009
Looping result0.00000.091410.0000
Template Total0.00105.810.0010
Template load0.00084.558810.0008
Template processing0.00021.223610.0002
Override
Cache load0.00053.043310.0005
General
dbfile0.00158.415280.0002
String conversion0.00000.058740.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