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()