Open mattdjenkinson opened 10 months ago
I have the same issue.
"menus": {
enabled: true,
config: {
maxDepth: 2,
layouts: {
menuItem: {
link: [
{
input: {
label: 'German title',
name: 'title_de',
type: 'text',
required: true
},
},
],
},
},
},
},
+1 similar issue facing
Are you using Strapi Typescript? if you are using Typescript, you need to update from strapi-server
file from js to ts, like example below.
// ./src/extensions/menus/strapi-server.ts
export default 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 = {
example_title: {
type: 'string'
},
example_bool: {
type: 'boolean'
},
example_enum: {
type: 'enumeration',
enum: ['col1', 'col2', 'col3', 'col4']
}
};
// Extend the `MenuItem` content type with custom attributes.
plugin.contentTypes['menu-item'].schema.attributes = {
...defaultAttrs,
...customAttrs
};
return plugin;
};
Is this already resolved guys ?
Hey, looking for some help with this plugin.
My extended
MenuItems
don't save to the DB. I can't see the new columns created in themenu_items
table, even after a re-build.Strapi: 4.15.5 Menus: 1.6.0 DB: mysql Node: 18.17.0
I have added the
strapi-server
file;and edited my plugins.ts;
Not sure what I'm doing wrong 🤔
Any help would be appreciated.
Thanks