[opencms-dev] How to create new resource type on XML XSD?

Saranyu Lavanyakul saranyu at cmu.edu
Tue Jul 5 16:12:25 CEST 2005


Thanks Thomas for the link. It is very useful.
However, I think the configuration in OCMS 6.0 is a bit different from 
that link. I finally needed to modify only on opencms-modules.xml in the 
section <resourcetypes> and <explorertypes>

The added sections looks like this.

            <resourcetypes>
...
                <type 
class="org.opencms.file.types.CmsResourceTypeXmlContent" 
name="heinz_news" id="28">
                    <param 
name="schema">/sites/default/heinz/heinz_news.xsd</param>
                </type>
            </resourcetypes>
            <explorertypes>
...
                <explorertype name="heinz_news" 
key="fileicon.heinz_news" icon="xmlcontent.gif" reference="xmlcontent">
                    <newresource page="structurecontent" 
uri="newresource_xmlcontent.jsp?newresourcetype=heinz_news" order="28"/>
                    <accesscontrol>
                        <accessentry principal="GROUP.Administrators" 
permissions="+r+v+w+c"/>
                        <accessentry principal="GROUP.Projectmanagers" 
permissions="+r+v+w+c"/>
                        <accessentry principal="GROUP.Users" 
permissions="+r+v+w+c"/>
                    </accesscontrol>
                </explorertype>
            </explorertypes>

It seems to work fine. However I ran into another minor problem. The 
wizard doesn't recognize the new resource name and shows the new resouce 
type as "??? fileicon.heinz_news ???". Do you know how to fix this? (I 
have attached a screenshot here, hope it is not too large)

Thanks.
Saranyu L.





Thomas Maerz wrote:

>Saranyu Lavanyakul <saranyu at cmu.edu> writes:
>
>  
>
>>How to add my new XSD to the resource type that I can choose in the menu 
>>"new --> stuctured content"
>>Or do I have to put it manually in the opencms-modules.xml
>>    
>>
>
>http://www.rueth.info/articlemanagement-documentation/opencms6/article_0005.html#section2
>
>
>Regards,
>Thomas
>
>
>
>_______________________________________________
>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
>
>  
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050705/49a7ddcb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot.jpg
Type: image/jpeg
Size: 102430 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050705/49a7ddcb/attachment.jpg>


More information about the opencms-dev mailing list