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

Merge remote-tracking branch 'original/dev' into lithuanian-translation

This commit is contained in:
Martynas Barzda
2012-11-03 08:57:27 +02:00

View File

@@ -119,8 +119,8 @@
// Create sitemap content
$map = '<?xml version="1.0" encoding="UTF-8"?>'."\n";
$map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '2'; } else { $parent = ''; $priority = '1'; }
foreach ($pages_list as $page) {
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; }
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').$parent.$page['slug'].'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", (int)$page['date']).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>'.$priority.'</priority>'."\n\t".'</url>'."\n";
}
@@ -130,7 +130,7 @@
// Add components to sitemap
if (count($components) > 0) {
foreach ($components as $component) {
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1</priority>'."\n\t".'</url>'."\n";
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1.0</priority>'."\n\t".'</url>'."\n";
}
}