strapi-plugin-menus icon indicating copy to clipboard operation
strapi-plugin-menus copied to clipboard

Make Menu Available via Slug

Open derschiw opened this issue 6 months ago • 0 comments

Hey there 😊

I very much like your plugin for its simplicity. I just wondered wether it would be a possible to make the menus available via its slug. For now it is only possible to search it via id, like so:

const mainMenu = await fetch(`${API_BASE_URL}/api/menus/1?`);
const footerMenu = await fetch(`${API_BASE_URL}/api/menus/2`);

In this case it would be nice to be able to search it this way (as the menu already has a slug attribute):

const mainMenu = await fetch(`${API_BASE_URL}/api/menus/main`);
const footerMenu = await fetch(`${API_BASE_URL}/api/menus/footer`);

Not 100% necessary but would be nice to have. Thanks and bye!

derschiw avatar Aug 14 '24 09:08 derschiw