[opencms-dev] /* Cant list folder files...

Thierry Collogne tcollogne at hotmail.com
Tue Jan 24 12:36:59 CET 2006


You have to set the "NavPos" and "NavText" properties  for the list3.jsp 
file,  so that the file is included in the navigation.

You can also try and specify the folder for navigation like this

    cms.getNavigation().getNavigationForFolder("/sites/wils/artigos/");


Hth,


Thierry


>From: "Wils" <wilson.neto at cesar.org.br>
>Reply-To: The OpenCms mailing list <opencms-dev at opencms.org>
>To: <opencms-dev at opencms.org>
>Subject: [opencms-dev] /* Cant list folder files...
>Date: Tue, 24 Jan 2006 08:29:45 -0300
>
>Hello,
>
>I have the script bellow.
>It not list the folder content, my folder is:
>/sites/wils/artigos/
>
>The file name is list3.jsp and it is in the same folder 
>(/sites/wils/artigos/list3.jsp)
>
>Please, what i am doing wrong?
>
>
><%@ page import="java.util.*" %><%
>
>// Create a JSP action element
>org.opencms.jsp.CmsJspActionElement cms = new 
>org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
>
>// Get a simple navigation of all pages / subfolders in the current folder
>List list = cms.getNavigation().getNavigationForFolder();
>Iterator i = list.iterator();
>
>
>
>out.println("<h3>A simple sample navigation</h3>" + list.size()  );
>
>
>
>//out.println("<p>Cache properties: <b>" + cms.property("cache","this") + 
>"</b></p><ul>");
>
>while (i.hasNext())
>{
>     org.opencms.jsp.CmsJspNavElement ne = 
>(org.opencms.jsp.CmsJspNavElement)i.next();
>
>     out.println("<li><a href=\"" + cms.link(ne.getResourceName()) + 
>"\">");
>     out.println(ne.getTitle() + "</a></li>");
>     out.println(ne.getFileName() + "</a></li>");
>
>
>   out.println("aaaaaaaaaaaa");
>
>
>}
>
>out.println("</ul>");
>
>%>
>
>tks
>regards


>
>_______________________________________________
>This mail is sent to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://lists.opencms.org/mailman/listinfo/opencms-dev





More information about the opencms-dev mailing list