Forums / Developer / Changing file extension to xml from html

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