'Accueil',
- 'selected' => $this->getData(['config', 'homePageId']),
+ 'selected' => $this->homePageId(),
'help' => 'La première page que vos visiteurs verront.'
]); ?>
diff --git a/core/module/course/course.php b/core/module/course/course.php
index ae51425..8205d7d 100644
--- a/core/module/course/course.php
+++ b/core/module/course/course.php
@@ -48,18 +48,20 @@ class course extends common
public static $swapMessage = [];
+ public static $pagesList = [];
+
public function index()
{
$courseIdShortTitle = helper::arrayColumn($this->getData(['course']), 'shortTitle');
ksort($courseIdShortTitle);
foreach ($courseIdShortTitle as $courseId => $courseTitle) {
- $categorieUrl = helper::baseUrl(!helper::checkRewrite()) . 'course/swap/' . $courseId ;
+ $categorieUrl = helper::baseUrl(!helper::checkRewrite()) . 'course/swap/' . $courseId;
self::$courses[] = [
$courseTitle,
$this->getData(['course', $courseId, 'author']),
$this->getData(['course', $courseId, 'description']),
- '
-
-
+ 'Accueil du cours',
+ ]); ?>
+
+
+ 'Catégorie',
- 'value' => $this->getdata(['course', $this->getUrl(2), 'category'])
]); ?>
diff --git a/core/module/course/view/edit/edit.php b/core/module/course/view/edit/edit.php
index fed361b..0bfac72 100644
--- a/core/module/course/view/edit/edit.php
+++ b/core/module/course/view/edit/edit.php
@@ -40,8 +40,14 @@
-
-
+ 'Accueil du cours',
+ 'selected' => $this->getdata(['course', $this->getUrl(2), 'homePageId']),
+ ]); ?>
+
+
+ 'Catégorie',
'value' => $this->getdata(['course', $this->getUrl(2), 'category'])
]); ?>
@@ -66,7 +72,7 @@
'datetime-local',
'label' => 'Ouverture',
- 'value' => is_null($this->getdata(['course', $this->getUrl(2), 'openingDate'])) ? '' :floor($this->getdata(['course', $this->getUrl(2), 'openingDate']) / 60) * 60
+ 'value' => is_null($this->getdata(['course', $this->getUrl(2), 'openingDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'openingDate']) / 60) * 60
]); ?>
diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php
index 09416b3..24802d2 100644
--- a/core/module/install/ressource/defaultdata.php
+++ b/core/module/install/ressource/defaultdata.php
@@ -682,7 +682,6 @@ class init extends common
'disable' => false,
'content' => 'accueil.html',
'hideTitle' => false,
- 'homePageId' => true,
'breadCrumb' => false,
'metaDescription' => '',
'metaTitle' => '',
@@ -984,7 +983,6 @@ class init extends common
'disable' => false,
'content' => 'accueil.html',
'hideTitle' => false,
- 'homePageId' => true,
'breadCrumb' => false,
'metaDescription' => '',
'metaTitle' => '',
diff --git a/core/module/page/page.php b/core/module/page/page.php
index 5d8ee96..3d957b0 100644
--- a/core/module/page/page.php
+++ b/core/module/page/page.php
@@ -211,7 +211,7 @@ class page extends common
]);
}
// Impossible de supprimer la page d'accueil
- elseif ($page === $this->getData(['config', 'homePageId'])) {
+ elseif ($page === $this->homePageId()) {
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . 'config',
diff --git a/core/module/sitemap/sitemap.php b/core/module/sitemap/sitemap.php
index beb947c..8cbad33 100644
--- a/core/module/sitemap/sitemap.php
+++ b/core/module/sitemap/sitemap.php
@@ -30,7 +30,7 @@ class sitemap extends common
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'])) {
- $pageUrl = ($parentId !== $this->getData(['config', 'homePageId'])) ? helper::baseUrl() . $parentId : helper::baseUrl(false);
+ $pageUrl = ($parentId !== $this->homePageId()) ? helper::baseUrl() . $parentId : helper::baseUrl(false);
$items .= '' . $this->getData(['page', $parentId, 'title']) . '';
} else {
// page désactivée
@@ -67,7 +67,7 @@ class sitemap extends common
// Sous-page
$items .= ' ';
if ($this->getData(['page', $childId, 'disable']) === false && $this->getUser('group') >= $this->getData(['page', $parentId, 'group'])) {
- $pageUrl = ($childId !== $this->getData(['config', 'homePageId'])) ? helper::baseUrl() . $childId : helper::baseUrl(false);
+ $pageUrl = ($childId !== $this->homePageId()) ? helper::baseUrl() . $childId : helper::baseUrl(false);
$items .= '' . $this->getData(['page', $childId, 'title']) . '';
} else {
// page désactivée