code: protected List<CmsResource> getNavigationPages() {
  
          List<CmsResource> result = new ArrayList<CmsResource>();
          CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(m_siteGuestCms);
          try {
              CmsResource rootDefaultFile = m_siteGuestCms.readDefaultFile(
                  m_siteGuestCms.getRequestContext().removeSiteRoot(m_baseFolderRootPath),
                  CmsResourceFilter.DEFAULT);
              if (rootDefaultFile != null) {
                  result.add(rootDefaultFile);
              }
          } catch (Exception e) {
              LOG.info(e.getLocalizedMessage(), e);
          }
          List<CmsJspNavElement> navElements = navBuilder.getSiteNavigation(
              m_baseFolderSitePath,
              CmsJspNavBuilder.Visibility.includeHidden,
              -1);
          for (CmsJspNavElement navElement : navElements) {
              CmsResource navResource = navElement.getResource();
              if (navResource.isFolder()) {
                  try {
                      CmsResource defaultFile = m_guestCms.readDefaultFile(navResource, CmsResourceFilter.DEFAULT_FILES);
                      if (defaultFile != null) {
                          result.add(defaultFile);
                      } else {
                          LOG.warn("Could not get default file for " + navResource.getRootPath());
                      }
                  } catch (CmsException e) {
                      LOG.warn("Could not get default file for " + navResource.getRootPath());
                  }
              } else {
                  result.add(navResource);
              }
          }
          return result;
      }
docs: Gets the list of pages from the navigation which should be directly added to the XML sitemap.<p>
  
  @return the list of pages to add to the XML sitemap