mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 04:07:59 +02:00
Sitemap Plugin: small updates
This commit is contained in:
@@ -7,5 +7,5 @@
|
||||
<plugin_description>Show sitemap</plugin_description>
|
||||
<plugin_version>1.0.0</plugin_version>
|
||||
<plugin_author>Awilum</plugin_author>
|
||||
<plugin_author_uri>http://awilum.webdevart.ru/</plugin_author_uri>
|
||||
<plugin_author_uri>http://monstra.org/</plugin_author_uri>
|
||||
</root>
|
@@ -54,15 +54,16 @@
|
||||
*/
|
||||
public static function content() {
|
||||
|
||||
// Init vars
|
||||
$pages_array = array();
|
||||
$count = 0;
|
||||
|
||||
// Get pages table
|
||||
$pages = new Table('pages');
|
||||
|
||||
// Get Pages List
|
||||
$pages_list = $pages->select('[slug!="error404" and status="published"]');
|
||||
|
||||
$pages_array = array();
|
||||
|
||||
$count = 0;
|
||||
|
||||
foreach ($pages_list as $page) {
|
||||
|
||||
$pages_array[$count]['title'] = Html::toText($page['title']);
|
||||
@@ -116,7 +117,7 @@
|
||||
$pages_list = $pages->select('[slug!="error404" and status="published"]');
|
||||
|
||||
// Create sitemap content
|
||||
$map = '<?xml version="1.0" encoding="UTF-8"?>'."\n";
|
||||
$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'].'/'; } else { $parent = ''; }
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<h3><?php echo __('Sitemap', 'sitemap'); ?></h3>
|
||||
<br />
|
||||
<hr>
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
|
Reference in New Issue
Block a user