[opencms-dev] Sitemap & A-Z listing - how?
kevin fong
kfong at spto.org
Sun Aug 8 23:07:01 CEST 2004
Tim, I haven't done this myself but off the top of my head, I'm thinking u can call org.opencms.jsp.CmsJspNavBuilder.getSiteNavigation() to get the whole site contents. (Remember to define NavPos and Nav properties).
1. Iterate through the list, for copy each NavElement into a TreeMap using the nav element's file name/title property as a key, ignoring folder elements
2. You should have a sorted TreeMap with the filenames as keys...
3. Loop through the tree map keys, with A-Z and regroup as necessary
4. You'll have to take care of the case where u have the same file name in multiple folders...
There maybe a simpler way out there to do this and would also be interested to know if there is.
Regds,
Kevin
On Aug 09 08:08, "Tim Van Der Hulst" <Tim.VanDerHulst at waidc.govt.nz> wrote:
>
> Subject: [opencms-dev] Sitemap & A-Z listing - how?
>
> Hi All,
>
> Bit of a newbie with OpenCMS, loving it already. I've written JSP to do my navigation. Now, what i'm after is a sitemap and also an A-Z listing of every (navigational) page/directory, ala sitemap.
>
> I looked at the archives and saw a posting on sitemap but wasn't entirely convinced that was the way to do it. Can anyone offer any insight here before I get cracking on it, seems pretty standard stuff to need so half surprised it hasn't came up more, or is this pretty easy stuff using CMSJspNavBuilder + CmsJspNavElement??
>
> thanks
>
> TiM
>
> ##
> ##
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
>
More information about the opencms-dev
mailing list