API to get the contentobject attribute id by passing content object id

Author Message

Neelima Amancherla

Friday 04 December 2009 6:26:06 am

We are facing problems with the way eZ Publish stores files/foldername in the ezcontentobject_tree,ezcontentobject,ezbinaryfile and ezcontentobject_name tables.
All the spaces in the file/folder names are getting replaced with underscores in the above mentioned tables.
If we want to retrieve folder/file name and to display its original name on the eng site, its quite impossible to handle this from DB.
And the original folder names are not stored in any of the above mentioned tables.
Are there any inbuilt API in eZ Publish to retrieve the original file and folder names.Or is there any other alternate approach to retrieve from DB.

Ɓukasz Serwatka

Tuesday 08 December 2009 1:18:36 am

Hi,

There are few possibilities to get such data. You can start by looking on the eZContentObject class as well as on eZContentObjectAttribute class. Both reside under kernel/classes folder.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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

Main resources:

Total runtime0.8357 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.0057 589.5234152.6875
Module start 'layout' 0.00570.0032 742.210939.5078
Module start 'content' 0.00890.8254 781.7188524.8281
Module end 'content' 0.83430.0014 1,306.54698.0938
Script end 0.8357  1,314.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3925160.0002
Check MTime0.00130.1590160.0001
Mysql Total
Database connection0.00090.106810.0009
Mysqli_queries0.793494.9374540.0147
Looping result0.00050.0561520.0000
Template Total0.806196.520.4031
Template load0.00200.240920.0010
Template processing0.804196.218020.4021
Template load and register function0.00020.020010.0002
states
state_id_array0.00080.092510.0008
state_identifier_array0.00150.178820.0007
Override
Cache load0.00160.1951120.0001
Sytem overhead
Fetch class attribute can translate value0.00160.190420.0008
Fetch class attribute name0.00170.200430.0006
XML
Image XML parsing0.00070.085820.0004
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00070.0863180.0000
String conversion0.00000.004940.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.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.0002 secs