[9.1.10] fix sitemap.xml article brouillon

This commit is contained in:
fredtempez 2019-06-10 16:21:41 +02:00
parent 5d144c0058
commit 0c68f36088

View File

@ -673,15 +673,19 @@ class common {
// La sous-page est un blog // La sous-page est un blog
if ($this->getData(['page', $childKey, 'moduleId']) === 'blog') { if ($this->getData(['page', $childKey, 'moduleId']) === 'blog') {
foreach($this->getData(['module',$childKey]) as $articleId => $article) { foreach($this->getData(['module',$childKey]) as $articleId => $article) {
$sitemap->addUrl( $childKey . '/' . $articleId ) ; if($this->getData(['module',$childKey,$articleId,'state']) === true) {
$sitemap->addUrl( $childKey . '/' . $articleId ) ;
}
} }
} }
} }
// Articles du blog // Articles du blog
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') { if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') {
foreach($this->getData(['module',$parentPageId]) as $articleId => $article) { foreach($this->getData(['module',$parentPageId]) as $articleId => $article) {
$sitemap->addUrl( $parentPageId . '/' . $articleId ) ; if($this->getData(['module',$parentPageId,$articleId,'state']) === true) {
$sitemap->addUrl( $parentPageId . '/' . $articleId ) ;
}
} }
} }
} }