forked from ZwiiCMS-Team/ZwiiCMS
[9.1.13] erreur sitemap blog sans article !
This commit is contained in:
parent
2358ab291e
commit
9e25104b0e
@ -680,7 +680,8 @@ class common {
|
|||||||
$sitemap->addUrl($childKey,$datetime);
|
$sitemap->addUrl($childKey,$datetime);
|
||||||
|
|
||||||
// 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' &&
|
||||||
|
!empty($this->getData(['module',$childKey])) ) {
|
||||||
foreach($this->getData(['module',$childKey]) as $articleId => $article) {
|
foreach($this->getData(['module',$childKey]) as $articleId => $article) {
|
||||||
if($this->getData(['module',$childKey,$articleId,'state']) === true) {
|
if($this->getData(['module',$childKey,$articleId,'state']) === true) {
|
||||||
$date = $this->getData(['module',$childKey,$articleId,'publishedOn']);
|
$date = $this->getData(['module',$childKey,$articleId,'publishedOn']);
|
||||||
@ -690,7 +691,8 @@ class common {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Articles du blog
|
// Articles du blog
|
||||||
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog') {
|
if ($this->getData(['page', $parentPageId, 'moduleId']) === 'blog' &&
|
||||||
|
!empty($this->getData(['module',$parentPageId])) ) {
|
||||||
foreach($this->getData(['module',$parentPageId]) as $articleId => $article) {
|
foreach($this->getData(['module',$parentPageId]) as $articleId => $article) {
|
||||||
if($this->getData(['module',$parentPageId,$articleId,'state']) === true) {
|
if($this->getData(['module',$parentPageId,$articleId,'state']) === true) {
|
||||||
$date = $this->getData(['module',$parentPageId,$articleId,'publishedOn']);
|
$date = $this->getData(['module',$parentPageId,$articleId,'publishedOn']);
|
||||||
|
Loading…
Reference in New Issue
Block a user