[opencms-dev] nico- Template for OpenCms
Michael, Nick N
Nick.Michael at standardbank.co.za
Mon Aug 1 14:01:27 CEST 2005
Here is my proposal for a JSP template see code below this message.
Will it work ?
Have I forgotten any mandatory Includes?
What do I need to make it work ?
<!--- basicTemplate1.jsp --->
<%@ page import="java.util.*" %>
<%@ page session="false" import="org.opencms.jsp.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%
// initialize action element to access the API for breadcrumb
CmsTemplateNavigation cms2 = new CmsTemplateNavigation(pageContext,
request, response);
// Create a JSP action element for menu
org.opencms.jsp.CmsJspActionElement cms3 = new
CmsJspActionElement(pageContext, request, response);
// Get a simple navigation of all pages / subfolders in the current
folder
List list = cms3.getNavigation().getNavigationForFolder();
Iterator i = list.iterator();
%>
<html>
<head>
<title>OpenCms -<cms:propertyname="Title" escapeHtml="true"
/></title>
<cms:editable/>
</head>
<body>
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td>
<!-- Simple breadcrumb starts here -->
<%=
cms2.buildNavigationBreadCrumb("breadcrumb") %>
<!-- Simple breadcrumb ends here -->
<h2><cms:propertyname="Title"
escapeHtml="true" /></h2>
</td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="20%">
<!-- Simple Navigation starts here -->
<%
while (i.hasNext()) {
CmsJspNavElement ne =
(CmsJspNavElement)i.next();
out.println("<li><a href=\"" +
cms.link(ne.getResourceName()) + "\">");
out.println(ne.getTitle() + "</a>");
}
out.println("</ul>");
%>
<!-- Simple Navigation ends here -->
</td>
<td width="80%">
<!-- Main page body starts here -->
<cms:includeelement="body" editable="true"/>
<!-- Main page body ends here -->
</td>
</tr>
</table></td>
</tr>
<tr>
<td>foot</td>
</tr>
</table>
</body>
</html>
__________________________________________________________________________________________________________________________________
Standard Bank Disclaimer and Confidentiality Note
This e-mail, its attachments and any rights attaching hereto are, unless the context clearly indicates otherwise, the property of Standard Bank Group Limited
and/or its subsidiaries ("the Group"). It is confidential, private and intended for the addressee only. Should you not be the addressee and receive this e-mail by
mistake, kindly notify the sender, and delete this e-mail, immediately and do not disclose or use same in any manner whatsoever. Views and opinions
expressed in this e-mail are those of the sender unless clearly stated as those of the Group. The Group accepts no liability whatsoever for any loss or
damages whatsoever and howsoever incurred, or suffered, resulting, or arising, from the use of this email or its attachments. The Group does not warrant the integrity
of this e-mail nor that it is free of errors, viruses, interception or interference. Licensed divisions of the Standard Bank Group are authorised financial services providers
in terms of the Financial Advisory and Intermediary Services Act, No 37 of 2002 (FAIS).
For information about the Standard Bank Group Limited visit our website http://www.standardbank.co.za
___________________________________________________________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050801/4b308588/attachment.htm>
More information about the opencms-dev
mailing list