SiteInfo siteInfo = webSite.getSiteInfo();
Path rootPath = (path == null) ? siteInfo.getThemeRoot(pagePath) : new Path(path);
Path pathInMenu = webSite.getSiteMap().getPathInMenu(pagePath);
int baseLevel = rootPath.getElementCount() + 1;
int spc = Utils.parseInt(space, 8);
SiteMapIterator iter = new SiteMapIterator(webSite, rootPath);
iter.setSkipHiddenSubPages(allowHiding);
Writer outWriter = getOut();
while (iter.hasNext()) {
PageInfo current = (PageInfo) iter.next();
Path currentPath = current.getPath();
Path parentPath = currentPath.getParent();
if (parentPath.isRelative() || pathInMenu.isContainedIn(parentPath)) {
if (Utils.isTrue(expand) ||