[opencms-dev] How to register my xml content definition

fengbo xie fengbo.xie at gmail.com
Thu Oct 13 19:02:39 CEST 2005


I defined a new resource type named MyNews using xsd. It mostly like
the News Article resource type defined in templateone module demo. How
can I register this resource type to the system? In other words, I
want a checkbox of "MyNews" be in the list  for picking up  when I
click the "new" button and select "Structured content".

I explored manifest.xml  in the package
org.opencms.frontend.templateone.modules_1.0.0.zip, and found the
following code segement:
----------------------------
<resourcetypes>
			<type class="org.opencms.file.types.CmsResourceTypeXmlContent"
name="news" id="30">
				<properties>
					<property>
						<name>content-conversion</name>
						<value type="shared"><![CDATA[cleanup;xhtml]]></value>
					</property>
					<property>
						<name>template-elements</name>
						<value type="shared"><![CDATA[/system/modules/org.opencms.frontend.templateone.modules/pages/detail-news.html]]></value>
					</property>
				</properties>
				<param name="schema">/system/modules/org.opencms.frontend.templateone.modules/schemas/news.xsd</param>
			</type>
<!-- other resourcetypes, ommited -->
</resourcetypes>
-------------------
I'm guessing the code response to resource type registration. But I
don't know how to config it. Should I code the manifest.xml of my
module mannually?
I'll be very appriate if someone familiar with this mechanism. Thanks very much.
I'm a newbie of OpenCms, directly to 6.0 which introduced xml content.
How you guys add customized content definitions in 5.0 ?



More information about the opencms-dev mailing list