[opencms-dev] Drag and Drop Custom Content Type into Container

Ying Kwan Lam conniesookie at gmail.com
Thu Jul 12 09:57:27 CEST 2012


Hi everyone,



I am an OpenCms beginner. I am currently using OpenCms 8.0.4. I wanna
create a new Content type for users to drag and drop.



I successfully created my new resource type via the following steps.



1. Create a module named my.module.poll under /system/modules/

2. Get into /system/modules/my.module.poll/schemas, create an XSD file to
define the schema named as poll.xsd

3. Add my formatter (.jsp file with formatter tag) under
/system/modules/my.module.poll/formatters

4. Go to opencms_modules.xml file to add two more elements (e.g.
resourecetypes and exploretype)

5. Create a workplace.propertes file to name the label under
/system/modules/my.module.poll/my/module/poll

6. Export the module and publish the module

7. Re-start the tomcat.



Actually, the new resource type is created. I have no problem up to now.



I tried to make the resource type as the content type.

That mean I can use the drag and drop feature to create a new Poll content
in container



2. Go to /system/modules/my.module.poll

2. Create a module config file named as .config and set the Resource Type
information such as Type name, Folder and Name Pattern

3. Go the the folder e.g. /site/default/flower_en/.content

4. Edit the .config file (adding the newly-created resource type)



Now, I went to flower_en webpage and I can find the Poll content shown in
the content list after clicking "Add Content" icon.

However, no container support the newly-created content type.



That mean, no container is highlighted to let me drag and drop
newly-created Poll content.



Please kindly tell me what I am missing.



Is my concept correct to create a new content type?


Thanks for your kind attention.

-- 
Best Wishes,
Connie Lam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120712/00f0df62/attachment.htm>


More information about the opencms-dev mailing list