Php code to get node_id with url

Author Message

Christophe Saint-Pierre

Wednesday 24 December 2008 7:03:13 am

Hi ,
I would like to know where to get examples of php code witch ca do :

- get the node_id of a node with the url in argument.

For example I have the url : "/Ecole/Actualites/Vivement-Les-Vacances" and I would appreciate the function witch gives me the node_id.

Thank

Carlos Revillo

Thursday 25 December 2008 2:15:10 am

Hi. Maybe you can try with

eZContentObjectTreeNode::fetchByURLPath($url)

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 18:27:29
Script start
Timing: Jan 18 2025 18:27:29
Module start 'layout'
Timing: Jan 18 2025 18:27:29
Module start 'content'
Timing: Jan 18 2025 18:27:30
Module end 'content'
Timing: Jan 18 2025 18:27:30
Script end

Main resources:

Total runtime0.8846 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 587.9219152.6250
Module start 'layout' 0.00550.0026 740.546939.4453
Module start 'content' 0.00810.8751 779.9922453.6250
Module end 'content' 0.88320.0014 1,233.61728.1563
Script end 0.8846  1,241.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3500160.0002
Check MTime0.00120.1381160.0001
Mysql Total
Database connection0.00090.100710.0009
Mysqli_queries0.844995.5092540.0156
Looping result0.00050.0563520.0000
Template Total0.850796.220.4254
Template load0.00210.237420.0011
Template processing0.848695.930220.4243
Template load and register function0.00020.028110.0002
states
state_id_array0.00120.138610.0012
state_identifier_array0.00120.140020.0006
Override
Cache load0.00170.1913110.0002
Sytem overhead
Fetch class attribute can translate value0.00060.068520.0003
Fetch class attribute name0.00090.096320.0004
XML
Image XML parsing0.00020.022620.0001
class_abstraction
Instantiating content class attribute0.00000.000620.0000
General
dbfile0.00070.0752100.0001
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs