From 5af79c4fc2027a4d3411e51b5a4c5df65e23ce53 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 6 Sep 2019 11:02:08 +0200 Subject: [PATCH] wip #2922 @1 --- src/app/Magic/Models/CubistMagicPageModel.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/app/Magic/Models/CubistMagicPageModel.php b/src/app/Magic/Models/CubistMagicPageModel.php index e19ae7f..61617d0 100644 --- a/src/app/Magic/Models/CubistMagicPageModel.php +++ b/src/app/Magic/Models/CubistMagicPageModel.php @@ -9,11 +9,40 @@ class CubistMagicPageModel extends CubistMagicModel public function setFields() { parent::setFields(); + $this->_seo(); if (config('cubist.internal_search', false)) { $this->_internalSearch(); } $this->_social(); + $this->_menu(); + } + + public function _menu() + { + $tab = 'Menus'; + + $options = ['children' => 'Cette page et tous ces enfants', 'page' => 'Cette page uniquement', 'no' => 'Non intégrée']; + + $this->addField(['name' => 'menu_desktop', + 'label' => 'Intégration dans le menu « Desktop »', + 'default' => 'children', + 'type' => 'SelectFromArray', + 'translatable' => false, + 'allows_null' => false, + 'options' => $options, + 'tab' => $tab]); + + $options = array_merge(['desktop' => 'Comme le menu « Desktop »'], $options); + + $this->addField(['name' => 'menu_mobile', + 'label' => 'Intégration dans le menu « Mobile »', + 'default' => 'desktop', + 'type' => 'SelectFromArray', + 'translatable' => false, + 'allows_null' => false, + 'options' => $options, + 'tab' => $tab]); } protected function _internalSearch() -- 2.39.5