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

Michael Emmerich m.emmerich at alkacon.com
Thu Jul 12 15:10:07 CEST 2012


Hi,

you should check the following:

1) If your formatter jsp would cause an error, it could not be dropped 
into a container. You might some more info in the opencms.log.
You could try to remove everything from the formatter except the 
formatter tag to see if this works.

2) How did you define the formatters in the XSD? Maybe the width/name 
information does not fit to any of the containers on your page.

Kind Regards,
Michael.


> 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
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>


-- 
Kind Regards,
Michael.

-------------------

Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in 
Cologne, Germany http://www.opencms-days.org

Michael Emmerich

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org




More information about the opencms-dev mailing list