/** * Collect all navigation elements from the files in the given folder, * navigation elements are of class CmsJspNavElement.<p> * * @param folder the selected folder * @return A sorted (ascending to nav position) ArrayList of navigation elements. */ public List getNavigationForFolder(String folder) { return getNavigationForFolder(m_cms, folder); }
/** * Collect all navigation elements from the files of the folder of the current request URI.<p> * * @return a sorted (ascending to navigation position) list of navigation elements */ public List<CmsJspNavElement> getNavigationForFolder() { return getNavigationForFolder(m_requestUriFolder); }
/** * Collect all navigation visible elements from the files in the given folder.<p> * * @param folder the selected folder * * @return A sorted (ascending to navigation position) list of navigation elements */ public List<CmsJspNavElement> getNavigationForFolder(String folder) { return getNavigationForFolder(folder, Visibility.navigation, CmsResourceFilter.DEFAULT); }
/** * Collect all navigation elements from the files of the folder of the current request URI, * navigation elements are of class CmsJspNavElement.<p> * * @return a sorted (ascending to nav position) ArrayList of navigation elements. */ public List getNavigationForFolder() { return getNavigationForFolder(m_cms, m_requestUriFolder); }
/** * Build a navigation for the folder that is either minus levels up * from of the folder of the current request URI, or that is plus levels down from the * root folder towards the current request URI.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * @return a sorted (ascending to navigation position) list of navigation elements */ public List<CmsJspNavElement> getNavigationForFolder(int level) { return getNavigationForFolder(m_requestUriFolder, level); }
/** * Build a navigation for the folder that is either minus levels up * from of the folder of the current request URI, or that is plus levels down from the * root folder towards the current request URI.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * @return a sorted (ascending to nav position) ArrayList of navigation elements */ public List getNavigationForFolder(int level) { return getNavigationForFolder(m_cms, m_requestUriFolder, level); }
/** * Build a navigation for the folder that is either minus levels up * from the given folder, or that is plus levels down from the * root folder towards the given folder.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param folder the selected folder * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * @return a sorted (ascending to nav position) ArrayList of navigation elements */ public List getNavigationForFolder(String folder, int level) { return getNavigationForFolder(m_cms, folder, level); }
/** * Collect all navigation elements from the files in the given folder, * navigation elements are of class {@link CmsJspNavElement}.<p> * * @param cms context provider for the current request * @param folder the selected folder * * @return a sorted (ascending to navigation position) list of navigation elements * * @deprecated use {@link #getNavigationForFolder(String)} instead */ @Deprecated public static List<CmsJspNavElement> getNavigationForFolder(CmsObject cms, String folder) { return new CmsJspNavBuilder(cms).getNavigationForFolder(folder); }
/** * Build a navigation for the folder that is either minus levels up * from the given folder, or that is plus levels down from the * root folder towards the given folder.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param cms context provider for the current request * @param folder the selected folder * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * * @return a sorted (ascending to navigation position) list of navigation elements * * @deprecated use {@link #getNavigationForFolder(String, int)} instead */ @Deprecated public static List<CmsJspNavElement> getNavigationForFolder(CmsObject cms, String folder, int level) { return new CmsJspNavBuilder(cms).getNavigationForFolder(folder, level); }
/** * Build a navigation for the folder that is either minus levels up * from the given folder, or that is plus levels down from the * root folder towards the given folder.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param folder the selected folder * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * * @return a sorted (ascending to navigation position) list of navigation elements */ public List<CmsJspNavElement> getNavigationForFolder(String folder, int level) { folder = CmsResource.getFolderPath(folder); // If level is one just use root folder if (level == 0) { return getNavigationForFolder("/"); } String navfolder = CmsResource.getPathPart(folder, level); // If navigation folder found use it to build navigation if (navfolder != null) { return getNavigationForFolder(navfolder); } // Nothing found, return empty list return Collections.<CmsJspNavElement> emptyList(); }
/** * Build a navigation for the folder that is either minus levels up * from the given folder, or that is plus levels down from the * root folder towards the given folder.<p> * * If level is set to zero the root folder is used by convention.<p> * * @param cms context provider for the current request * @param folder the selected folder * @param level if negative, walk this many levels up, if positive, walk this many * levels down from root folder * @return a sorted (ascending to nav position) ArrayList of navigation elements */ public static List getNavigationForFolder(CmsObject cms, String folder, int level) { folder = CmsResource.getFolderPath(folder); // If level is one just use root folder if (level == 0) { return getNavigationForFolder(cms, "/"); } String navfolder = CmsResource.getPathPart(folder, level); // If navfolder found use it to build navigation if (navfolder != null) { return getNavigationForFolder(cms, navfolder); } // Nothing found, return empty list return Collections.EMPTY_LIST; }
List curnav = getNavigationForFolder(cms, folder);
List navList = CmsJspNavBuilder.getNavigationForFolder(cms, resourceName); float navPos = 1; if (navList.size() > 0) {
List<CmsJspNavElement> navList = new CmsJspNavBuilder(cms).getNavigationForFolder(resourceName); float navPos = 1; if (navList.size() > 0) {
return getNavigationForFolder(CmsResource.getPathPart(folder, startlevel), startlevel); List<CmsJspNavElement> entries = getNavigationForFolder(currentfolder);
/** * Gets the sitemap sub entries for a given path as resources.<p> * * @param rootPath the root path * @return the sitemap sub entry resources * @throws CmsException if something goes wrong */ protected List<CmsResource> getSitemapSubEntryResources(String rootPath) throws CmsException { CmsObject rootCms = OpenCms.initCmsObject(getCmsObject()); List<CmsResource> result = new ArrayList<CmsResource>(); rootCms.getRequestContext().setSiteRoot(""); CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(rootCms); for (CmsJspNavElement navElement : navBuilder.getNavigationForFolder( rootPath, Visibility.all, CmsResourceFilter.ONLY_VISIBLE)) { if ((navElement != null) && navElement.isInNavigation()) { result.add(navElement.getResource()); } } return result; }
List<CmsJspNavElement> curnav = getNavigationForFolder(folder);
/** * Creates children for this node by loading child navigation entries for this node's navigation entry.<p< */ @SuppressWarnings("synthetic-access") void expand() { for (CmsJspNavElement navElement : m_navBuilder.getNavigationForFolder( m_navElement.getResource().getRootPath(), Visibility.all, CmsResourceFilter.ONLY_VISIBLE)) { if ((navElement != null) && navElement.isInNavigation()) { NavigationNode child = new NavigationNode(navElement); addChild(child); } } }
for (CmsJspNavElement navElement : getNavBuilder().getNavigationForFolder( root, Visibility.all,
parentPath = CmsResource.getParentFolder(cms.getSitePath(entryFolder)); List<CmsJspNavElement> navElements = getNavBuilder().getNavigationForFolder( parentPath, Visibility.all,