[opencms-dev] Create Editable HTML with JSP elements?

Alexander Kandzior alex at opencms.org
Tue Jul 8 10:23:02 CEST 2003


Steven,

the way do do this is like:

1. Have one JSP based template that is used for both HTML pages and
forms.
2. Check out the template-howto from the documentation. This explains
how to set up the template. Now your JSP form has the template but
misses the ediable content.
3. On you JSP form, do something like this:

--------------
<%
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
String contentInput = CmsFile.getPath(cms.getRequestContext().getUri())
+ "formediable_content.html";   
%>

Some html stuff here

<!-- Add html form page "formediable_content.html":
<%
cms.includeSilent(contentInput, "body");
%>

Some more html stuff here
----------------

So you end up with 2 resources in your folder where your form is: 
The form itself and the "formediable_content.html" page. 
The form reads the content from the page like.
To edit the content on the form, just edit the page.

To prevent users from directly accessing the "formediable_content.html"
page, set the "i" flag in the permissions.


Best Regards,
Alex.

Alexander Kandzior
Alkacon Software - The OpenCms Experts
http://www.alkacon.com

> -----Original Message-----
> From: opencms-dev-admin at opencms.org 
> [mailto:opencms-dev-admin at opencms.org] On Behalf Of Steve
> Sent: Friday, July 04, 2003 9:47 AM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Create Editable HTML with JSP elements?
> 
> 
> Well, that means that
> 
> Hello all,
> 
> Thanks for replying, David. But doesn't that mean that we are 
> probably going to create a lot of jsp templates? each for 
> single editable html page? I originally thought that 
> jsptemplates/ folder were acting much like frametemplates/ 
> folder where we possibly have only very few template stored there.
> 
> Steven Ho
> 
> ----- Original Message -----
> From: "David Seikel" <david.seikel at icemedia.com.au>
> To: <opencms-dev at opencms.org>
> Sent: Thursday, July 03, 2003 4:17 PM
> Subject: Re: [opencms-dev] Create Editable HTML with JSP elements?
> 
> 
> > It's not supposed to be possible to do it that way around.  Just 
> > rearrange things so that the editable HTML is in the body, but ALL 
> > else is in templates, to be wrapped around the body in the usual 
> > manner.
> >
> > _______________________________________________
> > 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
> 
> 




More information about the opencms-dev mailing list