<%@ page import="com.opencms.core.*,java.util.*,org.opencms.jsp.*" %><%-- This program is part of the Alkacon OpenCms Software library. This license applies to all programs, pages, Java classes, parts and modules of the Alkacon OpenCms Software library published by Alkacon Software GmbH, unless otherwise noted. Copyright (c) 2005 Alkacon Software GmbH (http://www.alkacon.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information about Alkacon Software GmbH, please see the companys website: http://www.alkacon.com. For further information about OpenCms, please see the OpenCms project website: http://www.opencms.org. The names "Alkacon", "Alkacon Software GmbH" and "OpenCms" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact info@alkacon.com. Products derived from this software may not be called "Alkacon", or "OpenCms" appear in their name, without prior written permission of Alkacon Software GmbH. This program is also available under a commercial non-GPL license. For pricing and ordering information, please inquire at sales@alkacon.com. --%><% // Create a JSP action element org.opencms.jsp.CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); // get the template String template = cms.property("template", "search", "system/modules/com.alkacon.documentation/templates/alkacon-documentation"); // load template head cms.include(template, "head"); // Get the current file and folder name String filename = cms.getCmsObject().getRequestContext().getUri(); String foldername = org.opencms.file.CmsResource.getFolderPath(filename); String foldericon = cms.link("/system/modules/com.alkacon.documentation/resources/ic_folder.gif"); String fileicon = cms.link("/system/modules/com.alkacon.documentation/resources/ic_file.gif"); String codeicon = cms.link("/system/modules/com.alkacon.documentation/resources/code.gif"); String executeicon = cms.link("/system/modules/com.alkacon.documentation/resources/execute.gif"); boolean examplefolder = "true".equals(cms.property("examplefolder", "search", "false")); // look for index_content.html file in current folder try { cms.include(foldername + "index_content.html", "body", true); } catch (Exception e) { // file does not exist, ignore and go on } // Get a list of all pages / subfolders in the folder (sorted by NavPos property) List list = cms.getNavigation().getNavigationForFolder(); Iterator i = list.iterator(); while (i.hasNext()) { CmsJspNavElement ne = (CmsJspNavElement)i.next(); String description = ne.getDescription(); String target = ne.getProperty("target"); if (! "external".equals(target)) target = "_self"; if (! ne.getResourceName().equals(filename)) { out.println("

"); if (ne.isFolderLink()) { out.println("\"folder\" "); } else { out.println("\"file\" "); } out.println(ne.getTitle() + ""); if (examplefolder && ! ne.isFolderLink()) { if (ne.getFileName().startsWith("link_")) { out.println("    " + "\"Show"); } else { out.println("    " + "\"Show    "); out.println("" + "\"Execute\""); } } out.println("

"); if (description==null) { description = "Click on the link above to open this item."; } out.println("

" + description + "

"); } } // load template foot cms.include(template, "foot"); %>