code: public List<CmsJspNavElement> getNavigationForFolder(
          String folder,
          Visibility visibility,
          CmsResourceFilter resourceFilter) {
  
          folder = CmsFileUtil.removeTrailingSeparator(folder);
          List<CmsJspNavElement> result = new ArrayList<CmsJspNavElement>();
  
          List<CmsResource> resources = null;
          try {
  
              resources = m_cms.getResourcesInFolder(folder, resourceFilter);
          } catch (Exception e) {
              // should never happen
              LOG.error(e.getLocalizedMessage(), e);
          }
          if (resources == null) {
              return Collections.<CmsJspNavElement> emptyList();
          }
          boolean includeAll = visibility == Visibility.all;
          boolean includeHidden = visibility == Visibility.includeHidden;
          for (CmsResource r : resources) {
              CmsJspNavElement element = getNavigationForResource(m_cms.getSitePath(r), resourceFilter);
              if ((element != null)
                  && (includeAll
                      || (element.isInNavigation() && (includeHidden || !element.isHiddenNavigationEntry())))) {
                  element.setNavContext(new NavContext(this, visibility, resourceFilter));
                  result.add(element);
              }
          }
          Collections.sort(result);
          return result;
      }
docs: Collect all navigation elements from the files in the given folder.<p>
  
  @param folder the selected folder
  @param visibility the visibility mode
  @param resourceFilter the filter to use reading the resources
  
  @return A sorted (ascending to navigation position) list of navigation elements