[opencms-dev] bug in the template provided : non-existing directory provokes error

Thomas März thomasmaerz at gmx.de
Fri Jun 6 16:30:02 CEST 2003

Nicolas Delsaux <nicolas.delsaux at online.fr> writes:
>> I investigated a little, and found that it was due to my topfolder.
>> As a default, this Java variable is positionned to be the /"locale"/
>> directory (in my case, /fr/), which I haven't. And the use of this
>> directory in
>> cms.getNavigation().getNavigationForResource(topfolder); results in

Why don't you use the code in template-nav-left.jsp of the module
org.opencms.templates? You don't need the property "locale" to build a

| com.opencms.file.CmsObject cmsObject = cms.getCmsObject();
| String uri = cmsObject.getRequestContext().getUri();
| ArrayList nav1pages = CmsJspNavBuilder.getNavigationForFolder(cmsObject, uri, 1);
| Iterator i = nav1pages.iterator();
| while (i.hasNext()) {
| }

Or did I misunderstand something? Of course you can't get a navigation
for a not existing folder. What exactly is the problem?

Best Regards,
Thomas März

More information about the opencms-dev mailing list