Synyx GmbH & Co. KG Homepage Welcome Guest   | Login
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Register  | Search  | Help  | RSS feeds
OpenCms 7.0.4 Live-CD available!

Synyx created an OpenCms 7.0.4 Live CD, based on SLAX Linux, which is now available.

If you want to order a free CD copy, please write, including your postal address, to



Quick Go »
Thread Status: Normal
Total posts in this thread: 5
[Add To My Favorites] [Watch this Thread] [Post new Thread]
Author
Previous Thread This topic has been viewed 1907 times and has 4 replies Next Thread
Male shrikants
Stranger



Joined: Jan 3, 2008
Posts: 1
Status: Offline

Help for template Design Reply to this Post
Reply with Quote

confused
Please can anyone help me in creating new Template..
Different ways of creating like JSP,XML or any..
I have created simple template and even Html pages based on given Template. But needed to create own template with different design..
The documentation provided with OPemCms is not helpfull...

Help for Template Design

Thanks in advance..
[Jan 7, 2008 6:10:43 AM] Show Printable Version of Post     [Link] Report threatening or abusive post: please login first  Go to top 
Male rexwal
Member


Philippines
Joined: Dec 17, 2007
Posts: 79
Status: Offline

Re: Help for template Design Reply to this Post
Reply with Quote

try this

make a template called template.jsp
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html>
<head/>
<body>
<cms:template element="header">
This is my header!
</cms:template>
</body>
</html>


then create another jsp page called test.jsp

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:include property="template" element="header"/>
This is stuff from test.jsp!

and then set the template of test.jsp to the path of template.jsp

then click test.jsp and you should get something simple working
----------------------------------------
Sun Certified Java Programmer/Web Components Developer
[Jan 7, 2008 11:00:24 AM] Show Printable Version of Post        Hidden to Guest    http://www.southville.edu.ph [Link] Report threatening or abusive post: please login first  Go to top 
Male pavanpinnu
Stranger


India
Joined: Jul 7, 2008
Posts: 2
Status: Offline

confused   Re: Help for template Design Reply to this Post
Reply with Quote

 

and then set the template of test.jsp to the path of template.jsp

then click test.jsp and you should get something simple working


Hi,

how to set the template for 'test.jsp' with the path of template.jsp.

thanks & regards
pavanpinnu.
[Jul 7, 2008 11:45:19 AM] Show Printable Version of Post        Hidden to Guest    pavanpinnu [Link] Report threatening or abusive post: please login first  Go to top 
Male Flo
Advanced Member
Member's Avatar


Joined: May 7, 2004
Posts: 456
Status: Offline
Re: Help for template Design Reply to this Post
Reply with Quote

The template used is set as a property of the page that should be displayed
----------------------------------------
/**
* Florian Hopf
* Synyx GmbH & Co. KG
*/
[Jul 8, 2008 9:53:05 AM] Show Printable Version of Post        http://www.synyx.de [Link] Report threatening or abusive post: please login first  Go to top 
Male clonez
Stranger



Joined: May 24, 2009
Posts: 5
Status: Offline

Re: Help for template Design Reply to this Post
Reply with Quote

 
try this

make a template called template.jsp
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<html>
<head/>
<body>
<cms:template element="header">
This is my header!
</cms:template>
</body>
</html>


then create another jsp page called test.jsp

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<cms:include property="template" element="header"/>
This is stuff from test.jsp!

and then set the template of test.jsp to the path of template.jsp

then click test.jsp and you should get something simple working




Hi rexwal, I try the method that you posted but it prompted me this error:


Server error 500
Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

javax.servlet.ServletException: javax.servlet.jsp.JspException: VFS target resource "/DBS/test.jsp" was already included earlier.

The server cannot complete the request because it encountered an error.


May I know how to solve this?
[May 25, 2009 11:21:36 AM] Show Printable Version of Post     [Link] Report threatening or abusive post: please login first  Go to top 
[Show Printable Version of Thread] [Post new Thread]