From: <Paw...@ne...> - 2004-03-18 17:34:07
|
Having implemented the generateXML interface on a couple of content type to replace their default xml rendering for presentation purposes I ran into problems the wrong xsl's use for html generation to the portals. This problem only occurred when I implemented the second interface on the second content type. I haven't investigated it in depth, but this can be resolve by adding a "objectType" element with the value of the full package and contenttype name to the generated element in the generateXML method that implements the interface, see the example below: public void generateXML(PageState state, Element parent, String useContext) { Element element = new Element("cms:item", CMS.CMS_XML_NS); Element objecttype = new Element("objectType"); objecttype.setText("[package].[ContentTypeName]"); element.newChildElement(objecttype); I didn't find this in the documentation, but believe it is a good practise to follow from already the first content type you have implementing the generateXML interface. It can save you some time of confusion. Hope some find this useful, Paw Hammerlund Andersen, Principal Consultant www.net2s.com |