Forums / Developer / Caching causing problem for XML feed / Comment49014
Gaetano Giunta
Wednesday 30 January 2008 12:58:59 am
As a side note: you should set up a correct pagelayout template and definitely content-type headers if you plan to produce xml via templating.
It is in fact quite easy to do, via the layout module. Just add this in an override file for layout.ini:
[xml] PageLayout=xml_pagelayout.tplContentType=text/xml
Then - set up xml_pagelayout.tpl to contain the xml prolog- use urls of the form ez/layout/set/xml/path/to/content to access your data in xml display mode
I would recommend creating a new view, eg: xml for displaying data as xml. This way you can still make use of node_view_gui and attribute_view_gui inside your templates. TEmplates to be done: /node/view/xml.tpl and content/datataype/view/xml/datatypexx.tpl
Principal Consultant International Business Member of the Community Project Board