diff --git a/plugins/box/sitemap/views/frontend/index.view.php b/plugins/box/sitemap/views/frontend/index.view.php index 5cf4c81..5c732ca 100644 --- a/plugins/box/sitemap/views/frontend/index.view.php +++ b/plugins/box/sitemap/views/frontend/index.view.php @@ -2,28 +2,46 @@ \n"; + } elseif(!$first && (trim($page['parent']) !== '' && $children_started || trim($page['parent']) === '')) { + $sitemap_html .= "\n"; + } + if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = ''; - if (trim($page['parent']) !== '') { echo ''."\n"; } + if (trim($page['parent']) !== '' && !$children_started) { + $children_started = true; + $sitemap_html .= "\n"; + } else { + $sitemap_html .= "\n"; } - if (count($components) == 0) { echo '