[opencms-dev] How to design a sitemap

Borja Marcos Suarez borja.suarez at fundacionctic.org
Wed May 25 08:52:21 CEST 2005


Great!

I've tried with the getSiteNavigation method but I didn't know how to indent or build the different levels.

It's easier than I thought

Thanks.


best regards,

Borja


-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] En nombre de Daniel Wiesner
Enviado el: miƩrcoles, 25 de mayo de 2005 8:47
Para: The OpenCms mailing list
Asunto: Re: [opencms-dev] How to design a sitemap

Borja,

in org.opencms.jsp.CmsJspNavBuilder is a method getSiteNavigation(String 
folder, int endLevel)

in a jsp you may use it like that:


// Create a JSP action element
CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, 
response);


// List of all pages / subfolders (sorted by NavPos property)
java.util.List list = cms.getNavigation().getSiteNavigation("/de/",-1);

java.util.Iterator i = list.iterator();

int level= 1;

while (i.hasNext()) {
CmsJspNavElement ne = (CmsJspNavElement)i.next();
level = ne.getNavTreeLevel();
...

I use the level to indent the entries:

StringBuffer sb = new StringBuffer(512);
sb.append("<div style=\"padding-left:");
sb.append(20 * level);
sb.append("px;");


regards
Daniel


Borja Marcos Suarez schrieb:

> Hi all,
>
> I'm a newbie in Open CMS and I have some questions that are breaking 
> my head. I hope you can help me.
>
> How can I develop the site map? I can't use navigation because not all 
> the folders and files are added to navigation.
>
> Does anybody know a way to get the tree under some given folder??
>
> Thanks in advance,
>
> Borja
>
>------------------------------------------------------------------------
>
>
>
>_______________________________________________
>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
>


-- 
-----------------------------------------------------------
AV-Studio Kommunikationsmedien GmbH Halle            
Kurallee 13, D-06114 Halle (Saale)

Fon: +49 (0345) 20 999 -0 * Fax: +49 (0345) 20 999 -20
email: office at av-studio.de * http://www.av-studio.de
-----------------------------------------------------------



_______________________________________________
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