1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-03 19:57:57 +02:00

Sitemap Errors #175 - fixes

This commit is contained in:
Awilum
2013-12-22 23:31:38 +02:00
parent a8ea2d4e02
commit 1a1bfabda0

View File

@@ -3,25 +3,27 @@
<ul> <ul>
<?php <?php
// Display pages // Display pages
if (count($pages_list) > 0) { if (count($pages_list) > 0) {
foreach ($pages_list as $page) { foreach ($pages_list as $page) {
if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = ''; if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';
if (trim($page['parent']) !== '') { echo '<ul>'; } if (trim($page['parent']) !== '') { echo '<ul>'."\n"; }
echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>'; echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>'."\n";
if (trim($page['parent']) !== '') { echo '</ul>'; } if (trim($page['parent']) !== '') { echo '</ul>'."\n"; }
} }
if (count($components) == 0) { echo '<ul>'; } if (count($components) == 0) { echo '<ul>'."\n"; }
} }
// Display components // Display components
if (count($components) > 0) { if (count($components) > 0) {
if (count($pages_list) == 0) { echo '<ul>'; } if (count($pages_list) == 0) { echo '<ul>'."\n"; }
foreach ($components as $component) { foreach ($components as $component) {
echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>'; echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>'."\n";
} }
echo '</ul>'; if (count($pages_list) == 0) { echo '</ul>'."\n"; }
} }
?> ?>