<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>Look at the other provided templates, specificly the
Welcome one. That one is MUCH simpler, templateOne is a bit to complicated to
learn from :) Check out the file
/system/modules/welcome/elements/welcome_nav.jsp which is included from the main
template at /systems/modules/welcome/templates/welcome (which is a jsp-type
page).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>You might also want to read the javadocs on at least
org.opencms.jsp.JspActionElement and NavBuilder/NavigationElement classes, those
are what you will use for building menu's.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>Example pasted below, forgive the lousy formatting due to
cut/paste ;-)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>== welcome_nav.jsp ==</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2><%@ page import="org.opencms.jsp.*"
%><% </FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2> /*
<BR> * This is a simple example on how to build a
dynamic navigation using JSP in OpenCms.<BR> * It serves
the purpose of demonstrating <BR> * the general way to
build a dynamic navigation using OpenCms resource
properties.<BR> */<BR>
<BR> // Create a JSP action element<BR>
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);<BR> <BR> // Some shortcuts to often used
Strings<BR> String filename =
cms.getRequestContext().getUri();</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2> // List of all pages / subfolders (sorted by NavPos
property)<BR> java.util.List list =
cms.getNavigation().getNavigationForFolder(); <BR>
java.util.Iterator i = list.iterator();</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2> // Now build the
navigation<BR> out.println("<p class=\"small\">Navigation:
");<BR> <BR> while (i.hasNext()) {<BR>
CmsJspNavElement ne = (CmsJspNavElement)i.next();<BR> if (!
ne.getResourceName().equals(filename))
{ <BR> out.println("<a
href=\"" + <BR> cms.link(ne.getResourceName()) + "\">"
<BR> + ne.getNavText() +
"</a>"); <BR> } else
{<BR> out.println(ne.getNavText()); <BR> }
<BR> if (i.hasNext()) {<BR> out.println(" |
");<BR> }<BR>
}<BR> out.println("</p>"); <BR>%></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>================</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=500061809-23032005><FONT face=Arial
color=#0000ff size=2>Frans</FONT></SPAN></DIV><FONT face=Arial color=#0000ff
size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><FONT face=Arial
color=#0000ff size=2></FONT><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Vaylee
Mckenzie-Daniels<BR><B>Sent:</B> woensdag 23 maart 2005 9:55<BR><B>To:</B>
opencms-dev@opencms.org<BR><B>Subject:</B> [opencms-dev] RE: Dynamic
navigation<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=406303808-23032005><FONT face=Arial><FONT size=2><SPAN
class=390575408-23032005><FONT
color=#0000ff>Hi</FONT></SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=406303808-23032005><FONT face=Arial><FONT color=#0000ff
size=2><SPAN class=390575408-23032005></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=406303808-23032005><FONT face=Arial><FONT size=2>I'm using
OpenCms 6, and I struggle <SPAN class=578514908-23032005><FONT
color=#0000ff><FONT color=#000000> with
</FONT> </FONT></SPAN>building a dynamic navigation. I have looked
at templateone, which is extremely complicated. Can someone please guide
me?</FONT></FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><SPAN class=406303808-23032005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=406303808-23032005><FONT face=Arial
size=2>Thx</FONT></SPAN></DIV>
<P><FONT face=Arial size=2>Vaylee
</FONT></P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>