I want to add a meta keywords field to the meta tab on the pages interface.
So I created a plugin called keywords and in the Plugin.php file I added this code in the register hook:
public function register()
{
Event::listen('backend.form.extendFields', function($widget) {
if (!$widget->model instanceof \Cms\Classes\Page) return;
$widget->addFields([
'settings[menu_text]' => [
'label' => 'Meta Keywords',
'tab' => 'Meta',
'span' => 'left',
],
], 'primary');
});
}
Now this adds another tab called Meta with the new field. I want this field to appear in the existing Meta field. Also I want to know how to save the data the user inputs in the field and then access it out on the template level.