simpub/sitemap.php

25 lines
487 B
PHP
Raw Normal View History

2018-07-25 22:55:30 +02:00
<?php
$CMS_ACTIVE = true;
$CMS_SITEMAP = true;
require_once "shared.php";
if (true) {
header('Content-type: application/xml');
?>
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php
foreach ($menuItems as $item) {
$url = $item['link'];
if ($url[0] == "/")
$url = getServerUrl() . $url;
echo "<url>\n\t<loc>" . htmlspecialchars($url) . "</loc>\n</url>\n";
}
require "blog.php";
?>
</urlset>
<?php
}
?>