[opencms-dev] how to show 2 level navigation in one page
Christoph P. Kukulies
kuku at physik.rwth-aachen.de
Tue Apr 18 10:04:30 CEST 2006
On Tue, Apr 18, 2006 at 09:15:14AM +0200, DI Gunther Schmidl wrote:
> > Actually, I want to build a directory navigation in the page, to show all
> > the information in one page. I can't find an API like this. Do I have to
> call
> > "getFolder list", and implement it by myself? Thank you for any help. Sean
>
> Hi,
>
> it's easiest to use getSiteNavigation:
>
> String subsite = "/sites/whatever/";
> CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
> response);
> Iterator iter = cms.getNavigation().getSiteNavigation(cms.getCmsObject(),
> subsite, -1).iterator();
>
> Note that:
> 1) the subsite cannot be "/" or you will get an empty list back for some
> reason
> 2) the subsite MUST end with "/" or you will get an empty list back for some
> reason
>
> You can find full code for a sitemap using <ul> lists on
> http://cms.galway.net:8080/OpenCmsWiki/Wiki.jsp?page=Tips
Hi Gunther,
thanks for posting that snippet. Just one question:
What does /sitemap.jsp in your example refer to?
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
More information about the opencms-dev
mailing list