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

Marcus Popetz marcus at roundpeg.com
Thu Oct 13 19:08:04 CEST 2005


Someone sent me this
http://www.opencms-forum.de/viewtopic.php?t=625

when I asked the same question.

-mp

At 01:02 PM 10/13/2005, fengbo xie wrote:
>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 ?
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list