deep-jade
deep-jade3mo ago

sidemenu elements name

how can I put a name differente than the resource name in the menu elements
2 Replies
kapa.ai
kapa.ai3mo ago
Hi @Jaoc1811. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- You can set a different name for the menu elements by using the meta.label property of the resource in the resources array of the <Refine> component. The meta.label property will be used as the display name of the resource in the menu. Here is an example:
import { Refine } from "@refinedev/core";

<Refine
...
resources={[
{
name: "posts",
list: "/posts",
meta: {
label: "My Custom Name", // This will be the display name in the menu
icon: "📝",
},
},
]}
/>;
import { Refine } from "@refinedev/core";

<Refine
...
resources={[
{
name: "posts",
list: "/posts",
meta: {
label: "My Custom Name", // This will be the display name in the menu
icon: "📝",
},
},
]}
/>;
In this example, even though the resource name is "posts", it will be displayed as "My Custom Name" in the menu. Source: Refine Documentation (https://refine.dev/docs/guides-concepts/faq#how-can-i-add-an-item-to-the-sider-component) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai3mo ago
<@110864105035808768> kapa.ai is still learning and improving, please let us know how it did by reacting below