forked from ZwiiCMS-Team/ZwiiCMS
[9.1.09] Sitemap corrigé
This commit is contained in:
parent
7e56f15d83
commit
682b5f72ba
@ -658,14 +658,16 @@ class common {
|
|||||||
$datetime->format(DateTime::ATOM); // Updated ISO8601
|
$datetime->format(DateTime::ATOM); // Updated ISO8601
|
||||||
// sitemap index file name
|
// sitemap index file name
|
||||||
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
|
$sitemap->sitemapIndexFileName = "sitemap-index.xml";
|
||||||
foreach($this->getHierarchy(null, false, false) as $parentPageId => $childrenPageIds) {
|
foreach($this->getHierarchy(null, true, null) as $parentPageId => $childrenPageIds) {
|
||||||
// Exclure les barres et les pages non publiques
|
// Exclure les barres et les pages non publiques et les pages masquées
|
||||||
if ($this->getData(['page',$parentPageId,'group']) !== 0 ||
|
if ($this->getData(['page',$parentPageId,'group']) !== 0 || $this->getData(['page', $parentPageId, 'disable']) === true) {
|
||||||
$this->getData(['page',$parentPageId,'block']) === 'bar') {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$sitemap->addUrl ($parentPageId,$datetime);
|
$sitemap->addUrl ($parentPageId,$datetime);
|
||||||
foreach($childrenPageIds as $childKey) {
|
foreach($childrenPageIds as $childKey) {
|
||||||
|
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$sitemap->addUrl($childKey,$datetime);
|
$sitemap->addUrl($childKey,$datetime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<?php foreach($this->getHierarchy() as $parentId => $childIds): ?>
|
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
|
||||||
<li>
|
<li>
|
||||||
<?php if ($this->getData(['page', $parentId, 'disable']) == false ||
|
<?php
|
||||||
$this->getData(['page', $parentId, 'block']) == 'bar' ||
|
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||||
$this->getUser('group') >= $module::$actions[$action]) { ?>
|
{ ?>
|
||||||
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
|
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
|
||||||
<?php } else { ?>
|
<?php
|
||||||
<?php echo $this->getData(['page', $parentId, 'title']); }?>
|
} else {
|
||||||
|
echo $this->getData(['page', $parentId, 'title']);
|
||||||
|
} ?>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($childIds as $childId): ?>
|
<?php foreach($childIds as $childId): ?>
|
||||||
<li>
|
<li>
|
||||||
<?php if ($this->getData(['page', $childId, 'disable']) == false ||
|
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||||
$this->getData(['page', $childId, 'block']) == 'bar' ||
|
{ ?>
|
||||||
$this->getUser('group') >= $module::$actions[$action]) { ?>
|
|
||||||
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
|
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<?php echo $this->getData(['page', $childId, 'title']); }?>
|
<?php echo $this->getData(['page', $childId, 'title']); }?>
|
||||||
|
Loading…
Reference in New Issue
Block a user