[9.1.10] sitemap articles fermés à masquer

This commit is contained in:
fredtempez 2019-06-10 15:48:43 +02:00
parent 3c9dda8f4d
commit 02b5dd4848
2 changed files with 13 additions and 9 deletions

View File

@ -32,7 +32,7 @@ class common {
const TEMP_DIR = 'site/tmp/';
// Numéro de version
const ZWII_VERSION = '9.1.09';
const ZWII_VERSION = '9.1.10';
public static $actions = [];
public static $coreModuleIds = [
@ -658,7 +658,7 @@ class common {
$datetime->format(DateTime::ATOM); // Updated ISO8601
// sitemap index file name
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
foreach($this->getHierarchy(null, true, null) as $parentPageId => $childrenPageIds) {
foreach($this->getHierarchy(null, null, null) as $parentPageId => $childrenPageIds) {
// Exclure les barres et les pages non publiques et les pages masquées
if ($this->getData(['page',$parentPageId,'group']) !== 0 || $this->getData(['page', $parentPageId, 'disable']) === true) {
continue;

View File

@ -27,9 +27,11 @@
<?php
foreach($this->getData(['module',$childId]) as $articleId => $article): ?>
<li>
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>
<?php if($this->getData(['module',$childId,$articleId,'state']) === true) {?>
<li>
<a href="<?php echo helper::baseUrl() . $childId . '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>
<?php } ?>
<?php endforeach;
} ?>
</ul>
@ -37,12 +39,14 @@
<?php endforeach; ?>
<!-- ou articles d'un blog-->
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog') { ?>
<?php if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' ) { ?>
<?php
foreach($this->getData(['module',$parentId]) as $articleId => $article): ?>
<li>
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>
<?php if($this->getData(['module',$parentId,$articleId,'state']) === true) {?>
<li>
<a href="<?php echo helper::baseUrl() . $parentId. '/' . $articleId;?>"><?php echo $article['title']; ?></a>
</li>
<?php } ?>
<?php endforeach;
} ?>
</ul>