Open raakesh opened 8 years ago
This is something I've noticed is still happening. Its a simple fix for it but you can hide the extra fields with this css. Just add it to the backend additional css tab in october.
.field-repeater-form div[data-field-name="viewBag[seo_title]"],
.field-repeater-form div[data-field-name="viewBag[seo_description]"],
.field-repeater-form div[data-field-name="viewBag[seo_keywords]"],
.field-repeater-form div[data-field-name="viewBag[canonical_url]"],
.field-repeater-form div[data-field-name="viewBag[redirect_url]"],
.field-repeater-form div[data-field-name="viewBag[robot_index]"],
.field-repeater-form div[data-field-name="viewBag[robot_follow]"] {
display: none;
}
Instead of hiding it, this small check gets rid of them completely as arrayName only gets populated within the repeater:
if(PluginManager::instance()->hasPlugin('RainLab.Pages') && $widget->model instanceof \RainLab\Pages\Classes\Page)
{
// skip adding meta fields for repeater-fields
if(!is_null($widget->arrayName)) { return; };
$widget->addFields([.....
After installing this plugin the repeater is not working as it should be, meta tag fields of this plugin are also repeating with the fields of the repeater.
`{repeater name="content_sections" prompt="Add More"}
{text name="title" label="Title"}Title{/text}
{/repeater}`
After installation https://www.dropbox.com/s/ezjuiu1lj8bqnu1/after-installation.png?dl=0
Before installation https://www.dropbox.com/s/g3hxnrusd2ux4i0/before-installation.png?dl=0