[opencms-dev] Templates the JSP way

Frans Postma fpostma at xs4all.nl
Thu May 5 13:09:10 CEST 2005


You need to create a new module and then you can add your own templates under
system/modules/mynewmodule/templates

It's a good idea to ONLY place the jsp files there which you want to be
available for choice in the choose-template dropdown. Other needed jsp's and
code fragement usually go in system/modules/mynewmodule/resources or whichever
other directory. 

Frans

> -----Original Message-----
> From: opencms-dev-bounces at opencms.org 
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Tim Squires
> Sent: donderdag 5 mei 2005 12:48
> To: opencms-dev at opencms.org
> Subject: [opencms-dev] Templates the JSP way
> 
> I'm yet another newbie to this OpenCMS thing.  The first and 
> only version
> I have is 6beta2.  I've been steadily going through the documentation,
> which it pretty good but I got to the template howto and I'm stuck on
> getting it to work....
> 
> I created a /sites/default/templates/ folder and added a 
> mytemplate.jsp
> file containing the taglib based example code in the howto.
> 
> When creating a new html page in /sites/default/release/ the 
> new template
> is not listed, I was expecting to see the title of the template in the
> list.
> 
> So I re-created the template/ folder and template jsp in 
> different places
> in the VFS with no luck.  Eventually I copied the jsp template to
> 
> /system/modules/org.opencms.frontend.templateone/templates/
> 
> now it appears in the list of templates available when 
> creating a page.
> 
> The only problem is that the content of the page is not shown.
> 
> Should the tag
> 
> <cms:include element="body"/>
> 
> display the content of the page that has my new template?
> 
> It can't be that difficult to create templates?  Please tell 
> me where I'm
> going wrong.
> 
> 
> Thanks,
> Tim
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
> 
> 
> 
> _______________________________________________
> 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