From cec57dc108fd72a80f17592be3948dad6794c87d Mon Sep 17 00:00:00 2001 From: metal_gvc Date: Tue, 18 Mar 2014 21:31:46 +0200 Subject: [PATCH] Sitemap Errors - ERROR 2 #175 --- .../box/sitemap/views/frontend/index.view.php | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) 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 '