diff --git a/core/core.php b/core/core.php
index 60519ae3..17c33557 100644
--- a/core/core.php
+++ b/core/core.php
@@ -1992,15 +1992,17 @@ class layout extends common {
)
) {
// Chemin de fer pour le titre avec des enfants
- echo '
' . $this->core->output['title'] . '
';
+ // echo '' . $this->core->output['title'] . '
';
// remplacé par :
- //echo '';
- //if ($this->getData(['page', $this->getUrl(0), 'parentPageId']) !== '' ) {
- // echo '';
- // echo ucfirst($this->getData(['page', $this->getUrl(0), 'parentPageId'])) . ' > ';
- //}
- // echo $this->core->output['title'] . '';
+ echo '';
+ if ( !empty($this->getData(['page', $this->getUrl(0), 'parentPageId'])) &&
+ $this->getData(['page', $this->getUrl(0), 'includeParent'])) {
+ echo '';
+ echo ucfirst($this->getData(['page', $this->getUrl(0), 'parentPageId'])) . ' > ';
+ }
+ echo $this->core->output['title'] . '
';
// Fin modif
+
}
echo $this->core->output['content'];
}
diff --git a/core/module/page/page.php b/core/module/page/page.php
index 823febe6..178221b9 100755
--- a/core/module/page/page.php
+++ b/core/module/page/page.php
@@ -65,6 +65,7 @@ class page extends common {
'disable' => false,
'content' => 'Contenu de votre nouvelle page.',
'hideTitle' => false,
+ 'includeParent' => false,
'metaDescription' => '',
'metaTitle' => '',
'moduleId' => '',
@@ -226,6 +227,7 @@ class page extends common {
'disable'=> $this->getinput('pageDisable', helper::FILTER_BOOLEAN),
'content' => (empty($this->getInput('pageEditContent', null)) ? "
" : $this->getInput('pageEditContent', null)) ,
'hideTitle' => $this->getInput('pageEditHideTitle', helper::FILTER_BOOLEAN),
+ 'includeParent' => $this->getInput('pageEditIncludeParent', helper::FILTER_BOOLEAN),
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),
'metaTitle' => $this->getInput('pageEditMetaTitle'),
'moduleId' => $this->getInput('pageEditModuleId'),
diff --git a/core/module/page/view/edit/edit.js.php b/core/module/page/view/edit/edit.js.php
index 64d292c0..ede93222 100755
--- a/core/module/page/view/edit/edit.js.php
+++ b/core/module/page/view/edit/edit.js.php
@@ -217,8 +217,33 @@ if ($("#pageEditBlock").val() === "bar") {
$("#pageEditTargetBlankWrapper").addClass("disabled");
$("#pageEditTargetBlankWrapper").slideDown();
}
+
+/**
+ * Masquer ou afficher le chemin de fer
+ */
-
+var pageEditHideTitleDOM = $("#pageEditHideTitle");
+pageEditHideTitleDOM.on("change", function() {
+ if ($(this).is(':checked')) {
+ $("#pageEditIncludeParentWrapper").removeClass("disabled");
+ $("#pageEditIncludeParentWrapper").slideUp();
+ } else {
+ $("#pageEditIncludeParentWrapper").addClass("disabled");
+ $("#pageEditIncludeParentWrapper").slideDown();
+ }
+});
+var pageEditParentPageIdDOM = $("#pageEditParentPageId");
+pageEditParentPageIdDOM.on("change", function() {
+ if ($(this).val() === "") {
+ console.log('true');
+ $("#pageEditIncludeParentWrapper").removeClass("disabled");
+ $("#pageEditIncludeParentWrapper").slideUp();
+ } else {
+ console.log('faux');
+ $("#pageEditIncludeParentWrapper").addClass("disabled");
+ $("#pageEditIncludeParentWrapper").slideDown();
+ }
+});
diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php
index 07924687..f64693e6 100755
--- a/core/module/page/view/edit/edit.php
+++ b/core/module/page/view/edit/edit.php
@@ -55,9 +55,6 @@
- $this->getData(['page', $this->getUrl(2), 'hideTitle'])
- ]); ?>
@@ -119,6 +116,18 @@
]); ?>
+
+
+ $this->getData(['page', $this->getUrl(2), 'hideTitle'])
+ ]); ?>
+
+
+ $this->getData(['page', $this->getUrl(2), 'includeParent'])
+ ]); ?>
+
+