'tab' => 'Informations principales',
]);
- $this->addField(['name' => 'slug',
- 'label' => 'Slug (URL)',
- 'type' => 'Slug',
- 'tab' => 'Informations principales',
- ]);
-
$this->_common();
}
'store_in' => 'seo',
]);
-// $this->addField(['name'=>'url_alias',
-// 'label'=>'URL Alias',
-// 'type'=>'Table',
-// 'hint'=>'Liste des anciennes URL correspondant à cette page. Peut être utilisé lors de la migration ']);
+ $this->addField(['name' => 'url_alias',
+ 'label' => 'Autres URLS',
+ 'type' => 'Table',
+ 'columns' => ['url' => 'URL'],
+ 'hint' => 'Liste des URL alternatives correspondant à cette page. Peut être utilisé lors de la migration. Si un visiteur tape une de ces URL, il sera redirigé vers cette page.',
+ 'tab' => $tab,
+ 'fake' => true,
+ 'store_in' => 'seo']);
}
}
public function init()
{
parent::init();
- $this->_seo();
- if (config('cubist.internal_search', false)) {
- $this->_internalSearch();
- }
- }
-
- protected function _internalSearch()
- {
- $tab = 'Recherche';
- $this->addField(['name' => 'search_internal_enabled',
- 'type' => 'Checkbox',
- 'label' => 'Activer',
- 'default' => true,
- 'hint' => 'Référencer cette page dans le moteur de recherche interne',
- 'tab' => $tab]);
-
- $this->addField(['name' => 'search_internal_keywords',
- 'type' => 'Tags',
- 'label' => 'Mots clés',
- 'hint' => 'Mots supplémentaires à utiliser par le moteur de recherche',
- 'tab' => $tab]);
- }
-
- protected function _seo()
- {
- $tab = 'SEO // Meta';
-
- $this->addField(['name' => 'slug',
- 'type' => 'Slug',
- 'label' => 'Slug (URL)',
- 'tab' => $tab,
- ]);
-
- $this->addField([
- 'name' => 'meta_title',
- 'label' => trans('backpack::pagemanager.meta_title'),
- 'type' => 'Text',
- 'hint' => trans('If empty, page title is used.') . ' ' . __('Recommended length: 60 chars'),
- 'tab' => $tab,
- 'store_in' => 'seo',
- ]);
-
- $this->addField([
- 'name' => 'meta_description',
- 'label' => trans('backpack::pagemanager.meta_description'),
- 'type' => 'Textarea',
- 'hint' => __('Recommended length: 160 chars'),
- 'tab' => $tab,
- 'store_in' => 'seo',
- ]);
-
- $this->addField([
- 'name' => 'robots',
- 'label' => __('Allow page index by search engines'),
- 'type' => 'Checkbox',
- 'default' => true,
- 'tab' => $tab,
- 'store_in' => 'seo',
- ]);
}
}