Topic: A small fix to the Sitemap of Monstra

Sitemap works weird and we know it, so i try to find a solution how to fix it...
I found one by removing all Components show from sitemap front view index file, it stop showing all plugins like users/ some backend plugins which does not even have a front view but still been showed in sitemap =/

so we have to go to plugins/box/sitemap/views/frontend/index.view.php
Delete all of the code in there and past this one instead:

    0) { $children_started = false; $first = true; foreach ($pages_list as $page) { if (trim($page['parent']) === '' && $children_started) { $children_started = false; $sitemap_html .= "
\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']) !== '' && !$children_started) { $children_started = true; $sitemap_html .= "
    \n"; } $sitemap_html .= '
  • '.$page['title'].''; $first = false; } if (trim($page['parent']) === '' && $children_started) { $sitemap_html .= "
\n"; } else { $sitemap_html .= "\n"; } } // Display components none! echo $sitemap_html; ?>

or if u dont want to touch any box plugins default codes / style just copy this

box/sitemap/views/frontend/index.view.php

and place it in ur theme for example if we have theme name "mytheme" so at the end it will look like this

public/themes/mytheme/box/sitemap/views/frontend/index.view.php

Because monstra first checking if there is any changed in front view at ur theme location if not then it take it from folder plugins, so even if u update monstra later all of ur change still gonna work no matter what wink

(с) Roman Art
So far So good wink

RomanArt's Website