[opencms-dev] nm- please help me to get a simple but useful template to work - please look at my code and help me

Michael, Nick N Nick.Michael at standardbank.co.za
Mon Aug 8 07:07:08 CEST 2005


Hi there dear friend
 
I am stuck an need your help. Its amazing how easy it is to get stuck with a
simple template.
 
I have read the Documentation from cover to cover I have studied the Java
API and am even an experienced Java Programmer
but that does not help me
 
The Problem I have is I cant make this simple template  work 
 
I wanted a simple template with :

*	breadcrumb
*	menu
*	body text(content)
*	optionally a footer

I wrote a simple one
 
There are no examples associated with the API so that is also not very
useful
So I could not figure how to make my breadcrumb
 
I can not get the template to deliver content (  I assume that is "body"
content)
I have not been able to make a Editable template 
I studied the API to see how to get a breadcrumb but with no example I am at
a loss
 
It seems that you can only use TemplateOne 
 
unless you buy a template from someone ( a wizard or great magician) 
 
or buy a book from somewhere which has a working example
 
So please help me 

With kind regards 
Nico 

          Here is my source code for what should be a very simple and
complete template 

          But three days later I still cant make it work

If only I could get it to work I would want to share it with the 
Open Cms Community to save others the blood, sweat and tears
 
_______________Code follows this line :  veryBasicTemplate1.jsp
_____________________________
 
 
<!--- veryBasicTemplate1.jsp --->
 
<%@ page import="java.util.*" %>
<%@ taglibprefix="cms" uri=" http://www.opencms.org/taglib/cms"%
<http://www.opencms.org/taglib/cms> >
 
<% 
 // java declarations go here :

 // Create a JSP action element for getting body content
 org.opencms.jsp.CmsJspActionElement cmsAct= new
org.opencms.jsp.CmsJspActionElement(pageContext, request, response); 
 
//Create a Navbuilder object for generating the Menu (at least this code is
working)
 org.opencms.jsp.CmsJspNavBuilder nav=new
org.opencms.jsp.CmsJspNavBuilder();
%>
 
<html>
 <head>
  <title>OpenCms -<cms:property name="Title" escapeHtml="true" /></title>
 </head>
 <body>
  <b>Template Version V.nm.002</b><br><br>
  <b>Title <cms:property name="Title" /></b><br><br>
 
  <!-- Simple breadcrumb starts here -->
  <%//=nav.getNavigationBreadCrumb() // I cant figure out how to call this
method %>
  <!-- Simple breadcrumb ends here --> 
  <br><br>       
  <!-- Navigation starts here This is working --> 
  The Menu goes here :<br>    
  <%            
           // Get a simple navigation of all pages / subfolders in the
current folder
           List list = cmsAct.getNavigation().getNavigationForFolder();
           Iterator i = list.iterator();
 
           while (i.hasNext()) {
               org.opencms.jsp.CmsJspNavElement ne =
(org.opencms.jsp.CmsJspNavElement)i.next();
               out.println("<br><a href=\"" +
cmsAct.link(ne.getResourceName()) + "\">");
               out.println(ne.getTitle() + "</a>");
           }    
           out.println("<br>");
  %>        
  <!-- Navigation ends here --> 
  <br><br>
  <!-- Main page body starts here -->Body goes here :<br> 
    <%
                                    // this is not working there is no
content on plage and it is not editable
               cmsAct.include(null,"body",true); //include a direct editable
page body
    %> 
  <!-- Main page body ends here --> 
  <br><br>
  Footer goes here   :<br></td>
                <!-- I could not figure out how to code a footer to be put
on the page-->
 </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/20050808/d67eadc6/attachment.htm>


More information about the opencms-dev mailing list