Changing file extension to xml from html

Author Message

James Ward

Monday 06 November 2006 8:20:10 am

I'm working with an older (ez 3.0) site and trying to setup some rss feeds. My plan is to fetch use a rssexport class to fetch appropriate data and override the pagelayout of an rss siteaccess to display. My problem is that the files will always be cached and rendered as .htm and I need them to be .xml. What do I need to hack to have ez render this siteaccess as an .xml file?

working at www.wardnet.com
blogging at www.jamesward.ca

Claudia Kosny

Tuesday 07 November 2006 12:07:58 pm

Hi James

What does your pagelayout.tpl look like? As far as I know the difference between html and xml is only in the document itself so if you have a custom pagelayout creating xml should not be a problem at all. If the problem is only the cache I would frankly just disable it - an rss feed should always be up to date. If you can't do without the caching I unfortunately do not know how to help you - maybe you can check the rss module of the newer ezversions.

Greetings from Luxembourg

Claudia

James Ward

Thursday 09 November 2006 11:55:58 am

The problem was that the header information sent by the index.php will always be html in this (very old) version of ez.

I decided to write my own script in rssfeed.php where I could set the header info myself with:

header( 'Content-Type: text/xml; charset=' . $httpCharset );

and created my own RSS Feed content objects for it to parse.

This is for such an old version of eZ I am sure its not worth release as a contrib but if anyone is stuck working with an old version and wants to add some RSS feel free to email me and I will send you the code.

working at www.wardnet.com
blogging at www.jamesward.ca

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 19 2025 01:15:34
Script start
Timing: Jan 19 2025 01:15:34
Module start 'layout'
Timing: Jan 19 2025 01:15:34
Module start 'content'
Timing: Jan 19 2025 01:15:34
Module end 'content'
Timing: Jan 19 2025 01:15:34
Script end

Main resources:

Total runtime0.6780 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.2891152.6406
Module start 'layout' 0.00550.0029 741.929739.4766
Module start 'content' 0.00840.6678 781.4063530.0000
Module end 'content' 0.67620.0017 1,311.406312.1250
Script end 0.6780  1,323.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5832160.0002
Check MTime0.00160.2358160.0001
Mysql Total
Database connection0.00090.127910.0009
Mysqli_queries0.625392.2225570.0110
Looping result0.00060.0841550.0000
Template Total0.643895.020.3219
Template load0.00260.382720.0013
Template processing0.641294.572420.3206
Template load and register function0.00010.016210.0001
states
state_id_array0.00100.145010.0010
state_identifier_array0.00170.256520.0009
Override
Cache load0.00220.3291170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.119920.0004
Fetch class attribute name0.00160.235940.0004
XML
Image XML parsing0.00070.097220.0003
class_abstraction
Instantiating content class attribute0.00000.001850.0000
General
dbfile0.00330.4855160.0002
String conversion0.00000.001240.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs