11.1.00 Nom des variables liste de pages cf commit d47f6e29

This commit is contained in:
Fred Tempez 2021-10-06 18:18:41 +02:00
parent c34eb7d84a
commit d09e928338
4 changed files with 20 additions and 20 deletions

View File

@ -182,8 +182,8 @@ class config extends common {
public static $i18nSite = 'fr';
// Variable pour construire la liste des pages du site
public static $pages = [];
public static $orphans = [];
public static $pagesList = [];
public static $orphansList = [];
/**
* Génére les fichiers pour les crawlers
@ -428,20 +428,20 @@ class config extends common {
}
// Liste des pages
self::$pages = $this->getData(['page']);
foreach(self::$pages as $page => $pageId) {
self::$pagesList = $this->getData(['page']);
foreach(self::$pagesList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' ||
$this->getData(['page',$page,'disable']) === true) {
unset(self::$pages[$page]);
unset(self::$pagesList[$page]);
}
}
self::$orphans = $this->getData(['page']);
foreach(self::$orphans as $page => $pageId) {
self::$orphansList = $this->getData(['page']);
foreach(self::$orphansList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' ||
$this->getData(['page',$page,'disable']) === true ||
$this->getdata(['page',$page, 'position']) !== 0) {
unset(self::$orphans[$page]);
unset(self::$orphansList[$page]);
}
}

View File

@ -84,21 +84,21 @@
<h4>Pages spéciales</h4>
<div class="row">
<div class="col4">
<?php echo template::select('configHomePageId', helper::arrayCollumn($module::$pages, 'title', 'SORT_ASC'), [
<?php echo template::select('configHomePageId', helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC'), [
'label' => 'Accueil du site',
'selected' =>$this->getData(['locale', 'homePageId']),
'help' => 'La première page que vos visiteurs verront.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('configPage403', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphans, 'title', 'SORT_ASC')), [
<?php echo template::select('configPage403', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Accès interdit, erreur 403',
'selected' =>$this->getData(['locale', 'page403']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('configPage404', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphans, 'title', 'SORT_ASC')), [
<?php echo template::select('configPage404', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Page inexistante, erreur 404',
'selected' =>$this->getData(['locale', 'page404']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'
@ -107,14 +107,14 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pages, 'title', 'SORT_ASC') ) , [
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Mentions légales',
'selected' => $this->getData(['locale', 'legalPageId']),
'help' => 'Les mentions légales sont obligatoires en France. Une option du pied de page ajoute un lien discret vers cette page.'
]); ?>
</div>
<div class="col4">
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pages, 'title', 'SORT_ASC') ) , [
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Recherche dans le site',
'selected' => $this->getData(['locale', 'searchPageId']),
'help' => 'Sélectionnez une page contenant le module \'Recherche\'. Une option du pied de page ajoute un lien discret vers cette page.'
@ -122,7 +122,7 @@
</div>
<div class="col4">
<?php
echo template::select('configPage302', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphans, 'title', 'SORT_ASC')), [
echo template::select('configPage302', array_merge(['none' => 'Page par défaut'],helper::arrayCollumn($module::$orphansList, 'title', 'SORT_ASC')), [
'label' => 'Site en maintenance',
'selected' =>$this->getData(['locale', 'page302']),
'help' => 'Cette page ne doit pas apparaître dans l\'arborescence du menu. Créez une page orpheline.'

View File

@ -241,7 +241,7 @@ class theme extends common {
];
// Variable pour construire la liste des pages du site
public static $pages = [];
public static $pagesList = [];
/**
* Thème des écrans d'administration
@ -398,11 +398,11 @@ class theme extends common {
}
// Liste des pages
self::$pages = $this->getData(['page']);
foreach(self::$pages as $page => $pageId) {
self::$pagesList = $this->getData(['page']);
foreach(self::$pagesList as $page => $pageId) {
if ($this->getData(['page',$page,'block']) === 'bar' ||
$this->getData(['page',$page,'disable']) === true) {
unset(self::$pages[$page]);
unset(self::$pagesList[$page]);
}
}

View File

@ -89,7 +89,7 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pages, 'title', 'SORT_ASC') ) , [
<?php echo template::select('configLegalPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Page Mentions légales ' . template::flag('site', '20px'),
'selected' => $this->getData(['locale', 'legalPageId'])
]); ?>
@ -102,7 +102,7 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pages, 'title', 'SORT_ASC') ) , [
<?php echo template::select('configSearchPageId', array_merge(['none' => 'Aucune'] , helper::arrayCollumn($module::$pagesList, 'title', 'SORT_ASC') ) , [
'label' => 'Page Rechercher ' . template::flag('site', '20px'),
'selected' => $this->getData(['locale', 'searchPageId']),
'help' => 'Options identique à la configuration du site',