Forums / Setup & design / Objects with XML file extension

Objects with XML file extension

Author Message

paul bolger

Sunday 04 May 2008 5:07:02 am

I need to output instances of an object with an .xml file extension so that JW Player can use them as a playlist. The now deprecated PDF module used to output objects with a .pdf extension. How would one go about making a new module to output with an xml extension? Or is there a simpler way?

regards
Paul Bolger

Paul Bolger

Maxime Thomas

Sunday 04 May 2008 11:34:07 pm

Hi Paul,

You can do your own extension with a module and a function.
To produce XML, you have two ways to do this :
- you can use a template, so you must use the layout set function.
- you can produce xml directly in your module, using SimpleXML or whatever.

Here's the documentation :
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/layout

And an excellent article on how design extensions for eZpublish.
http://ez.no/developer/articles/an_introduction_to_developing_ez_publish_extensions

Cheers !

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

eZ debug

Timing: Jan 19 2025 09:49:43
Script start
Timing: Jan 19 2025 09:49:43
Module start 'content'
Timing: Jan 19 2025 09:49:44
Module end 'content'
Timing: Jan 19 2025 09:49:44
Script end

Main resources:

Total runtime1.3126 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 590.1016180.8359
Module start 'content' 0.00701.3003 770.9375540.6563
Module end 'content' 1.30730.0052 1,311.593842.1094
Script end 1.3125  1,353.7031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.2164140.0002
Check MTime0.00130.0955140.0001
Mysql Total
Database connection0.00100.077910.0010
Mysqli_queries1.269296.6903550.0231
Looping result0.00050.0362530.0000
Template Total1.281397.620.6407
Template load0.00230.178320.0012
Template processing1.279097.437220.6395
Template load and register function0.00010.008510.0001
states
state_id_array0.00120.090910.0012
state_identifier_array0.00070.052720.0003
Override
Cache load0.00200.1487190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.042220.0003
Fetch class attribute name0.00110.080940.0003
XML
Image XML parsing0.00110.086720.0006
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00120.0901240.0000
String conversion0.00000.000430.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs