diff --git a/CHANGES.md b/CHANGES.md
index 067c5ac6..79d87ffd 100755
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -13,6 +13,7 @@ Mises à jour :
- la conversion des URL des ressources ne fonctionnait plus depuis l'externalisation du contenu des pages dans des fichiers séparés.
- Multi-langues :
- Bug auto détection du navigateur.
+ - Page site map, correction d'erreurs et rénovation de la présentation.
- Modifications :
- Gestion des cookies :
- Options de personnalisation du message d'acceptation des cookies, acceptation ou refus du cookie Google Analytics, affichage de la page des mentions légales.
diff --git a/core/module/sitemap/sitemap.php b/core/module/sitemap/sitemap.php
index 60f9a082..33ccf0eb 100644
--- a/core/module/sitemap/sitemap.php
+++ b/core/module/sitemap/sitemap.php
@@ -28,58 +28,21 @@ class sitemap extends common
{
$items = '
';
foreach ($this->getHierarchy(null, true, null) as $parentId => $childIds) {
- $items .= '- ';
- if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) {
- $items .= '' .$this->getData(['page', $parentId, 'title']) . '';
- // $items .= '<';
- } else {
- // page désactivée
- $items .= $this->getData(['page', $parentId, 'title']);
- }
-
- // ou articles d'un blog
- if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
- !empty($this->getData(['module',$parentId, 'posts' ]))) {
- $items .= '
';
- // Ids des articles par ordre de publication
- $articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $parentId,'posts']), 'publishedOn', 'SORT_DESC');
- $articleIdsStates = helper::arrayCollumn($this->getData(['module', $parentId, 'posts']), 'state', 'SORT_DESC');
- $articleIds = [];
- foreach ($articleIdsPublishedOns as $articleId => $articlePublishedOn) {
- if ($articlePublishedOn <= time() and $articleIdsStates[$articleId]) {
- $articleIds[] = $articleId;
- }
- }
- foreach ($articleIds as $articleId => $article) {
- if ($this->getData(['module',$parentId,'posts',$article,'state']) === true) {
- $items .= '- ';
- $items .= '' . $this->getData(['module',$parentId,'posts',$article,'title']) . '';
- $items .= '
';
- }
- }
- $items .= '
';
- }
-
- foreach ($childIds as $childId) {
- $items .= '';
- // Sous-page
- $items .= '- ';
- if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) {
- $items .= '' . $this->getData(['page', $childId, 'title']) . '';
+ $items .= '
- ';
+ if ($this->getData(['page', $parentId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) {
+ $items .= '' .$this->getData(['page', $parentId, 'title']) . '';
} else {
// page désactivée
- $items .= $this->getData(['page', $childId, 'title']);
+ $items .= $this->getData(['page', $parentId, 'title']);
}
- $items .= '
';
-
-
- // Articles d'une sous-page blog
- if ($this->getData(['page', $childId, 'moduleId']) === 'blog' &&
- !empty($this->getData(['module', $childId, 'posts' ]))) {
- $items .= '';
+ // ou articles d'un blog
+
+ if ($this->getData(['page', $parentId, 'moduleId']) === 'blog' &&
+ !empty($this->getData(['module',$parentId, 'posts' ]))) {
+ $items .= '';
// Ids des articles par ordre de publication
- $articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $childId,'posts']), 'publishedOn', 'SORT_DESC');
- $articleIdsStates = helper::arrayCollumn($this->getData(['module', $childId, 'posts']), 'state', 'SORT_DESC');
+ $articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $parentId,'posts']), 'publishedOn', 'SORT_DESC');
+ $articleIdsStates = helper::arrayCollumn($this->getData(['module', $parentId, 'posts']), 'state', 'SORT_DESC');
$articleIds = [];
foreach ($articleIdsPublishedOns as $articleId => $articlePublishedOn) {
if ($articlePublishedOn <= time() and $articleIdsStates[$articleId]) {
@@ -87,20 +50,55 @@ class sitemap extends common
}
}
foreach ($articleIds as $articleId => $article) {
- if ($this->getData(['module',$childId,'posts',$article,'state']) === true) {
- $items .= '- ';
- $items .= '' . $this->getData(['module',$childId,'posts',$article,'title']) . '';
+ if ($this->getData(['module',$parentId,'posts',$article,'state']) === true) {
+ $items .= '
- ';
+ $items .= '' . $this->getData(['module',$parentId,'posts',$article,'title']) . '';
$items .= '
';
}
}
$items .= '
';
+ }
+
+ foreach ($childIds as $childId) {
+ $items .= '';
+ // Sous-page
+ $items .= ' - ';
+ if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) {
+ $items .= '' . $this->getData(['page', $childId, 'title']) . '';
+ } else {
+ // page désactivée
+ $items .= $this->getData(['page', $childId, 'title']);
+ }
+ $items .= '
';
+
+ // Articles d'une sous-page blog
+ if ($this->getData(['page', $childId, 'moduleId']) === 'blog' &&
+ !empty($this->getData(['module', $childId, 'posts' ]))) {
+ $items .= '';
+ // Ids des articles par ordre de publication
+ $articleIdsPublishedOns = helper::arrayCollumn($this->getData(['module', $childId,'posts']), 'publishedOn', 'SORT_DESC');
+ $articleIdsStates = helper::arrayCollumn($this->getData(['module', $childId, 'posts']), 'state', 'SORT_DESC');
+ $articleIds = [];
+ foreach ($articleIdsPublishedOns as $articleId => $articlePublishedOn) {
+ if ($articlePublishedOn <= time() and $articleIdsStates[$articleId]) {
+ $articleIds[] = $articleId;
+ }
+ }
+ foreach ($articleIds as $articleId => $article) {
+ if ($this->getData(['module',$childId,'posts',$article,'state']) === true) {
+ $items .= ' - ';
+ $items .= '' . $this->getData(['module',$childId,'posts',$article,'title']) . '';
+ $items .= '
';
+ }
+ }
+ $items .= '
';
+ }
+ $items .= '
';
}
- $items .= '
';
- // Fin du grand bloc
- $items .= '
';
- }
+ $items .= '';
}
-
+ // Fin du grand bloc
+ $items .= '';
self::$siteMap = $items;
// Valeurs en sortie
diff --git a/core/module/sitemap/view/index/index.css b/core/module/sitemap/view/index/index.css
index b796d68a..598623d6 100755
--- a/core/module/sitemap/view/index/index.css
+++ b/core/module/sitemap/view/index/index.css
@@ -13,16 +13,17 @@
*/
#siteMap ul {
- list-style: none ;
- margin-left: .5em;
- padding-left: 1em;
- line-height: 1.5em;
- }
+ list-style: none ;
+ margin-left: .5em;
+ padding-left: 1em;
+ line-height: 1.5em;
+ font-size: 16px;
+}
-.pageIcon li::before {
- content: "📄 ";
+#siteMap ul > li::before {
+ content: "📄 ";
}
-.articleIcon li::before {
- content: "📝 ";
+#siteMap li > ul > li::before {
+ content: "📃 ";
}
\ No newline at end of file