diff --git a/core/core.php b/core/core.php index ce33a45f..cb0b4076 100644 --- a/core/core.php +++ b/core/core.php @@ -78,7 +78,8 @@ class common { 'position' => 1, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => 'Accueil' + 'title' => 'Accueil', + 'blocks' => '100' ], 'enfant' => [ 'typeMenu' => 'text', @@ -94,7 +95,8 @@ class common { 'position' => 1, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => 'Enfant' + 'title' => 'Enfant', + 'blocks' => '100' ], 'cachee' => [ 'typeMenu' => 'text', @@ -111,7 +113,8 @@ class common { 'position' => 2, 'group' => self::GROUP_MEMBER, 'targetBlank' => false, - 'title' => 'Cachée' + 'title' => 'Cachée', + 'blocks' => '100' ], 'blog' => [ 'typeMenu' => 'text', @@ -127,7 +130,8 @@ class common { 'position' => 3, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => 'Blog' + 'title' => 'Blog', + 'blocks' => '100' ], 'galeries' => [ 'typeMenu' => 'text', @@ -143,7 +147,8 @@ class common { 'position' => 4, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => 'Galeries' + 'title' => 'Galeries', + 'blocks' => '100' ], 'site-de-zwii' => [ 'typeMenu' => 'text', @@ -159,7 +164,8 @@ class common { 'position' => 5, 'group' => self::GROUP_VISITOR, 'targetBlank' => true, - 'title' => 'Site de Zwii' + 'title' => 'Site de Zwii', + 'blocks' => '100' ], 'contact' => [ 'typeMenu' => 'text', @@ -175,7 +181,8 @@ class common { 'position' => 6, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => 'Contact' + 'title' => 'Contact', + 'blocks' => '100' ], 'blockRight' => [ 'typeMenu' => '', @@ -381,8 +388,7 @@ class common { 'backgroundColor' => 'rgba(255, 255, 255, 1)', 'radius' => '0', 'shadow' => '0', - 'width' => '960px', - 'blocks' => '100' + 'width' => '960px' ], 'text' => [ 'font' => 'Open+Sans', diff --git a/core/layout/main.php b/core/layout/main.php index ac72294a..ed82b794 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -116,19 +116,10 @@ getUrl(0) === 'user' OR - $this->getUrl(0) === 'theme' OR - $this->getUrl(0) === 'config' OR - $this->getUrl(0) === 'page' OR - $this->getUrl(1) === 'config' OR - $this->getUrl(1) === 'edit' - ) { ?> -
showContent(); ?>
- getData(['theme','site','blocks'])); + // Récupérer la config de la page courante + $blocks = explode('-',$this->getData(['page',$this->getUrl(0),'blocks'])); + // Initialiser $blockleft=$blockright=""; switch (sizeof($blocks)) { case 1 : // une colonne @@ -146,8 +137,8 @@ case 3 : // 3 blocks $blockleft = 'col' . $blocks[0]; $content = 'col' . $blocks[1]; - $blockright = 'col' . $blocks[2]; - } + $blockright = 'col' . $blocks[2]; + } ?>
@@ -156,7 +147,6 @@
getData(['page','blockRight','content']);?>
- getData(['theme', 'footer', 'position']) === 'site' diff --git a/core/module/page/page.php b/core/module/page/page.php index ae247db6..b61be894 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -36,6 +36,14 @@ class page extends common { 'top' => 'En haut', 'free' => 'Libre' ]; + public static $pageBlocks = [ + '12' => 'Un seul bloc, uniquement le site', + '4-8' => 'Deux blocs : 1/3 - 2/3', + '8-4' => 'Deux blocs : 2/3 - 1/3', + '3-9' => 'Deux blocs : 1/4 - 3/4', + '9-3' => 'Deux blocs : 3/4 - 1/2', + '3-6-3' => 'Trois blocs : 1/4 - 1/2 - 1/4' + ]; /** * Création @@ -60,7 +68,8 @@ class page extends common { 'position' => 0, 'group' => self::GROUP_VISITOR, 'targetBlank' => false, - 'title' => $pageTitle + 'title' => $pageTitle, + 'blocks' => '100' ] ]); // Valeurs en sortie @@ -265,7 +274,8 @@ class page extends common { 'position' => $position, 'group' => $this->getInput('pageEditGroup', helper::FILTER_INT), 'targetBlank' => $this->getInput('pageEditTargetBlank', helper::FILTER_BOOLEAN), - 'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT, true) + 'title' => $this->getInput('pageEditTitle', helper::FILTER_STRING_SHORT, true), + 'blocks' => $this->getinput('pageEditBlocks'), ] ]); // Redirection vers la configuration diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index f3559600..4817aeac 100755 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -96,11 +96,14 @@ $this->getData(['page', $this->getUrl(2), 'targetBlank']) ]); ?> - $this->getData(['page', $this->getUrl(2), 'disable']) - ]); ?> - + ]); ?> + 'Gabarits :', + 'help' => 'Pour éditer le contenu des blocs, sélectionnez \'Édition des blocs\' dans la liste des pages.', + 'selected' => $this->getData(['page', $this->getUrl(2) , 'blocks']) + ]); ?>
diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 5d4b31c2..99737d17 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -203,15 +203,6 @@ class theme extends common { '100% 100%' => 'Taille adaptée au fond' ]; - public static $siteBlocks = [ - '12' => 'Un seul bloc, uniquement le site', - '4-8' => 'Deux blocs : 1/3 - 2/3', - '8-4' => 'Deux blocs : 2/3 - 1/3', - '3-9' => 'Deux blocs : 1/4 - 3/4', - '9-3' => 'Deux blocs : 3/4 - 1/2', - '3-6-3' => 'Trois blocs : 1/4 - 1/2 - 1/4' - ]; - /** * Mode avancé @@ -433,8 +424,7 @@ class theme extends common { 'backgroundColor' => $this->getInput('themeSiteBackgroundColor'), 'radius' => $this->getInput('themeSiteRadius'), 'shadow' => $this->getInput('themeSiteShadow'), - 'width' => $this->getInput('themeSiteWidth'), - 'blocks' => $this->getInput('themeSiteBlocks') + 'width' => $this->getInput('themeSiteWidth') ]]); // Valeurs en sortie $this->addOutput([ diff --git a/core/module/theme/view/site/site.php b/core/module/theme/view/site/site.php index 87ac015f..cf3fcf93 100755 --- a/core/module/theme/view/site/site.php +++ b/core/module/theme/view/site/site.php @@ -82,15 +82,6 @@ ]); ?>
-
-
- 'Répartition des blocs :', - 'help' => 'Pour éditer le contenu des blocs, sélectionnez \'Édition des blocs\' dans la liste des pages.', - 'selected' => $this->getData(['theme', 'site', 'blocks']) - ]); ?> -
-