[opencms-dev] How to design a sitemap

Daniel Wiesner daniel.wiesner at av-studio.de
Wed May 25 08:47:12 CEST 2005


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
-----------------------------------------------------------




More information about the opencms-dev mailing list