[opencms-dev] Add new resources type ??? (bis)
opencms-mailing at astron.biz
opencms-mailing at astron.biz
Wed Mar 10 14:56:00 CET 2004
I have done exactly the same but by copyinf the page restype, classes and so
on.
Noting when I click on create.
Regards
-----Original Message-----
From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of M Butcher
Sent: Tuesday, 09 March, 2004 17:26
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] Add new resources type ??? (bis)
I did something similar, but with fewer modifications, since my restype
was pretty basic.
I created a generic XML type (genxml) by subclassing
CmsResourceTypePlain in CmsResourceTypeGenericXml. I ended up putting
the class in the actual OpenCms package since I usually build OpenCms
from source anyway.
Then, all I had to add were the workplace/restypes/genxml file and the
icon file. I changed the workplace*.properties files to include
locale-specific labels, too.
Otherwise, it just uses the same templates as Plain -- which is what I
wanted.
It shows up along with the rest of the file types, and I can create one
with the "new" button in the Explorer view.
Matt
Vincent Hanniet wrote:
> Jim 20100 wrote:
>
>> Thanks but it does not work. I do not have my new type if I click on
>> New button.
>> Do you know how to import the workplace without going through the setup.
>> Regards
>
>
> I have succesfully added a new resource type (NP for New Page) derived
> from type "page" which appears in the "New" button. To do so, I have
> created/modified the files :
>
> * workplace/action/edit_NP.html
> * workplace/action/edit_NP_main.html
> * workplace/action/explorer_files_new_NP.htm
> * workplace/restypes/NP
> * workplace/templates/explorer_files_new
> * workplace/templates/explorer_files_new_NP
> * workplace/templates/edit_NP_main
> * workplace/resources/ic_file_NP.gif
> *
>
/system/modules/com.opencms.file/classes/com/opencms/file/CmsResourceTypeNP
> *
> /system/modules/com.opencms.file/classes/com/opencms/file/CmsNewResourceNP
>
> and added some lines to registry.xml (after the lines which describe
> the
> jsp type as it seems that the order of the resources types is hard coded
> somewhere in opencms) :
>
> <restype>
> <name>NP</name>
> <launcherType>3</launcherType>
> <launcherClass/>
> <resourceClass>com.opencms.file.CmsResourceTypeNP</resourceClass>
> </restype>
>
> In fact, if you just duplicate/rename the files used by the "page"
> type
> it runs.
>
> I hope this helps.
> Vincent Hanniet
>
> _______________________________________________
> 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
_______________________________________________
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
PLEASE NOTE: This mail has been scanned by ASTRON security
-------------- next part --------------
A non-text attachment was scrubbed...
Name: techmanDetail
Type: application/octet-stream
Size: 5358 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040310/bf6198c0/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: registry.xml
Type: text/xml
Size: 4239 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040310/bf6198c0/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CmsResourceTypeTechmanDetail.java
Type: application/octet-stream
Size: 40584 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040310/bf6198c0/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CmsNewResourceTechmanDetail.java
Type: application/octet-stream
Size: 25418 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040310/bf6198c0/attachment-0002.obj>
More information about the opencms-dev
mailing list