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
|
||||
// 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') {
|
||||
foreach($this->getHierarchy(null, true, 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;
|
||||
}
|
||||
$sitemap->addUrl ($parentPageId,$datetime);
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
if ($this->getData(['page',$childKey,'group']) !== 0 || $this->getData(['page', $childKey, 'disable']) === true) {
|
||||
continue;
|
||||
}
|
||||
$sitemap->addUrl($childKey,$datetime);
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,19 @@
|
||||
<ul>
|
||||
<?php foreach($this->getHierarchy() as $parentId => $childIds): ?>
|
||||
<?php foreach($this->getHierarchy(null,true,null) as $parentId => $childIds): ?>
|
||||
<li>
|
||||
<?php if ($this->getData(['page', $parentId, 'disable']) == false ||
|
||||
$this->getData(['page', $parentId, 'block']) == 'bar' ||
|
||||
$this->getUser('group') >= $module::$actions[$action]) { ?>
|
||||
<?php
|
||||
if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||
{ ?>
|
||||
<a href="<?php echo helper::baseUrl() . $parentId; ?>"><?php echo $this->getData(['page', $parentId, 'title']); ?></a>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->getData(['page', $parentId, 'title']); }?>
|
||||
<?php
|
||||
} else {
|
||||
echo $this->getData(['page', $parentId, 'title']);
|
||||
} ?>
|
||||
<ul>
|
||||
<?php foreach($childIds as $childId): ?>
|
||||
<li>
|
||||
<?php if ($this->getData(['page', $childId, 'disable']) == false ||
|
||||
$this->getData(['page', $childId, 'block']) == 'bar' ||
|
||||
$this->getUser('group') >= $module::$actions[$action]) { ?>
|
||||
<?php if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group']))
|
||||
{ ?>
|
||||
<a href="<?php echo helper::baseUrl() . $childId; ?>"><?php echo $this->getData(['page', $childId, 'title']); ?></a>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->getData(['page', $childId, 'title']); }?>
|
||||
|
Loading…
Reference in New Issue
Block a user