[opencms-dev] XML-Content defintitions

Rainer Steinegger steinegger at synyx.de
Tue Oct 24 17:15:27 CEST 2006


Hi Volkmar,

this tutorial should be the answer to all your questions:

http://www.wdogsystems.com/opencms/opencms/demos/structured_content_editing.html

greetings Rainer



Volkmar Emberger schrieb:
> hello.
>
> I think everybody knows this tutorial 
> http://mvnforum.synyx.de/opencms-forum/viewthread?thread=625#1739
> unfortunately it's deprecated.
> there are NO definitions in the opencms-vfs.xml or the 
> opencms-workplace.xml to get the opencms load my own structured 
> content at start.
> it's all now placed in the opencms-modules.xml
> my question: where do I have to put in this code into the 
> opencms-modules.xml? in my module? or in the module where "the other" 
> structured contents are placed?
>
> 8. Add own resource type and workplace context menu
> Last thing to do is to add an own resource type for you new content. Check
> out the "opencms-vfs.xml" in the WEB-INF/config folder. There you should
> find the node for the "article" content. Duplicate this node for your
> "myarticle". You also see that it points to the location of the schema. You
> also must give your type a new number. This may look like this:
>
> <type class="org.opencms.file.types.CmsResourceTypeXmlContent">
> 	<param name="resource.type.id">13</param>
> 	<param name="resource.type.name">myarticle</param>
> 	<param name="schema">/sites/default/myfolder/myarticle.xsd</param>
> </type>			
>
> Then add the context menu, which is done in "opencms-workplace.xml", and it
> may look like this:
>
> <explorertype name="myarticle" key="fileicon.myarticle" icon="myarticle.gif"
> reference="xmlcontent">
> 	<newresource
> uri="newresource_xmlcontent.jsp?newresourcetype=myarticle" order="25"/>
> </explorertype>	
>
> Note that the "key" refers to a localization entry, so this must be located
> in a workplace property file (see 7). The image "myarticle.gif" must be
> located in "/system/workplace/resources/filetypes/". 
>
> You need to restart OpenCms after these changes are made. After this, you
> should be able to create a new "myarticle" type with the "new" function in
> the workplace.
>   
> greedings Volkmar
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list