Hi, it would be nice if we can override the Menu Item layout because sometime user want some fields at the top or change (placeholder, description) of the original field such as target or url.
Currently it will add duplicate fields like in the code below. I think we can do filter unique field on function getFieldsLayout.
// ./src/extensions/menus/strapi-server.js`
'use strict';
module.exports = plugin => {
// Get current `MenuItem` attributes.
const defaultAttrs = plugin.contentTypes['menu-item'].schema.attributes;
// Define custom attributes for `MenuItem` the same way they would be defined
// on any other schema.
const customAttrs = {
zhTitle: {
type: 'string',
},
isHide: {
type: 'boolean',
},
};
// Extend the `MenuItem` content type with custom attributes.
plugin.contentTypes['menu-item'].schema.attributes = {
...defaultAttrs,
...customAttrs,
};
return plugin;
};
Hi, it would be nice if we can override the Menu Item layout because sometime user want some fields at the top or change (placeholder, description) of the original field such as
target
orurl
.Currently it will add duplicate fields like in the code below. I think we can do filter unique field on function
getFieldsLayout
.https://github.com/mattmilburn/strapi-plugin-menus/blob/70693ee8a9e6345997223e7614784f03e8f2cc2f/admin/src/utils/get-fields-layout.js#L89