[9.1.01] Exclure barre et pages membres du sitemap.

This commit is contained in:
fredtempez 2019-05-07 18:36:05 +02:00
parent ad6b70dfab
commit c5d3e93f03
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class common {
const GROUP_ADMIN = 3;
// Numéro de version
const ZWII_VERSION = '9.1.00';
const ZWII_VERSION = '9.1.01';
public static $actions = [];
public static $coreModuleIds = [
@ -655,6 +655,11 @@ class common {
// sitemap index file name
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
foreach($this->getHierarchy(null, false, false) as $parentPageId => $childrenPageIds) {
// Exclure les barres et les pages non publiques
if ($this->getData(['page',$parentPageId,'group']) !== 0 ||
$this->getData(['page',$parentPageId,'block']) === 'bar') {
continue;
}
$sitemap->addUrl ($parentPageId,$datetime);
foreach($childrenPageIds as $childKey) {
$sitemap->addUrl($childKey,$datetime);