AW: [opencms-dev] Divide the navigation tree in two parts for sep arate use

Michael Dernen Michael.Dernen at framfab.de
Mon Mar 4 09:49:39 CET 2002


Hi Manfred,
currently there is no support for showing the navigation of a 
specific folder in the CmsXmlNav class. But is should be fairly simple
to add it. You have to extend the class com.opencms.defaults.CmsXmlNav.
You can then create your own method "getNavSpecifiedFolder". The simplest
way is 
to copy the code from the getNavCurrent method and replace the code where
the folder that will be searched for navigation entries is determined:

replace:
String
currentFolder=cms.getRequestContext().currentFolder().getAbsolutePath();

with: 
String currentFolder = tagcontent;

If you set the absolute path inside OpenCms in your method tag this should
work.

regards,
Michael

-----Ursprüngliche Nachricht-----
Von: Manfred Pruntsch [mailto:manfred.pruntsch at ifcos.com]
Gesendet: Montag, 4. März 2002 00:49
An: opencms-dev at www.opencms.com
Betreff: [opencms-dev] Divide the navigation tree in two parts for
separate use


I want to realize a main navigation bar (main categories, left side on the
page) and and a separate help navigation bar (sitemap, help, contact a.s.o,
on the upper right corner).

First I've created the main navigation with the 'getNavRoot' method (Ok, it
works).
After that I've created a folder named 'helpnav' under the root without
adding to the navigation. All help files I put here - with navigation
properties. Next I will display the help navigation with a method which can
display the navigation of an specified folder given by a parameter such as:
<method "getNavSpecifiedFolder">/helpnav/</method>
and without adding to the current navigation.
Is there an existing method or have I to extend a java class and write the
method by myself?
In the latter case:
Do I have to make a getFiles method like the getFolders method in the
example 21 dev-doc? For example, calling with: String filelist =
getFiles(cms,template,'/helpnav/');

Or exist an another (more better) way?

with kindly regards
Manfred


________________________________________________________
Ifcos - Institut für Zell- und Organsimulation GmbH
E-Mail:     manfred.pruntsch at ifcos.com



More information about the opencms-dev mailing list