[opencms-dev] Structured Content and Logging in for Direct Edit

Toni PĂ©rez tp.ocms at gmail.com
Fri May 19 23:40:05 CEST 2006


Hello, Mike.


> My first question is regarding Structured Content.  I'm hijacking
> TemplateOne for my site, but I need to add new content types.  I have
> added a new XSD into
> /system/modules/org.opencms.frontend.templateone.modules/schemas/ and
> I have created an appropriate JSP to render the content as per the
> documentation.  What I can't work out is how to add an item into the
> list that appears when you select New --> Structured Content.  Where
> can I configure this?


You can open the "opencms-modules.xml" placed in the "WEB-INF/config"
folder of your OpenCms webapp and look for
"<name>org.opencms.frontend.templateone.modules</name>".
Inside the "module" element you can see the "resourcetypes" and the
"explorertype" elements. You can declare your new content type there
and restart OpenCms to apply the changes.

However, I think it's more suitable to make your own module and store
your XSD in it . Then, you can modify the "opencms-modules.xml".


> The second question is regarding logging in for access to Direct Edit.
>  I want to set the site up so that content managers can log in within
> the site itself, and can edit content they are authorised to change
> directly.  Is there a predefined login page which can be used within
> TemplateOne?  Alternatively, is there a JSP I can 'borrow' the
> appropriate code from?


You can see something similar in the "OpenCms 6 Welcome page and
release notes" module.
I did a test following these steps:
    * In the workplace, I defined a property "login_project" for the
"/release/" folder and assigned it the value "Offline".
    * I published the folder.
    * I left from the workplace and went to
"http://localhost:8080/opencms/opencms/release"
    * There is a login form at the bottom of the page. If you login in
with "Admin", for example, you would see the same page with the
"direct edit" icon.

I hope that helps you.
Bye.



More information about the opencms-dev mailing list