# Aggiungi nuovo elemento al menu a tendina utente

**URL:** https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755
**Category:** Support
**Tags:** user-menu
**Created:** [26 Novembre 2025, 5:46pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755 "2025-11-26T17:46:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![miguelbemartin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miguelbemartin/32/531228_2.png) [@miguelbemartin](https://meta.discourse.org/u/miguelbemartin)
#### Post date: [26 Novembre 2025, 5:46pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755/1 "2025-11-26T17:46:07Z")

</div>

Come posso aggiungere un nuovo elemento al menu a discesa dell’utente? Posso personalizzarlo e aggiungere un nuovo elemento lì?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [26 Novembre 2025, 6:33pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755/2 "2025-11-26T18:33:33Z")

</div>

Benvenuto su Meta 👋

Puoi usare la [plugin-API](https://github.com/discourse/discourse/blob/27256c450761b23c5252165d3b2094a10f284346/frontend/discourse/app/lib/plugin-api.gjs#L2263) per aggiungere un nuovo link a quel menu. Puoi, ad esempio, farlo direttamente nell’interfaccia di amministrazione creando un [nuovo componente tema](https://meta.discourse.org/t/customizing-themes-without-an-edit-code-button/329601#p-1617331-creating-a-custom-component-3) e aggiungendo qualcosa di simile alla scheda JS:

```js
api.addQuickAccessProfileItem({
 icon: "pencil",
 href: "/somewhere",
 content: "Title"
})

```

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/b/3/3b31628a7e16e73d439ea50ad10711dc142358af.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/1/f/e1ffbaa7c08c2b42832e6af5feee976f77f7f942.png)

---

<div class="post-metadata">

### Author: ![miguelbemartin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/miguelbemartin/32/531228_2.png) [@miguelbemartin](https://meta.discourse.org/u/miguelbemartin)
#### Post date: [26 Novembre 2025, 8:42pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755/3 "2025-11-26T20:42:49Z")

</div>

Questo funziona nel tema Horizon? Ricevo un errore nel browser

![Screenshot 2025-11-26 at 21.42.22](https://global.discourse-cdn.com/meta/original/4X/2/7/f/27f124ac83d8ef99ba5ad4ac8735fdedbaa34f05.png)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [26 Novembre 2025, 8:56pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755/4 "2025-11-26T20:56:43Z")

</div>

Sì, scusa, ho commesso un errore quando ho copiato il codice.

Per impostazione predefinita, vedi questo nella scheda JS.

```js
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  // Il tuo codice qui
});

```

E poi, metti questo dove si trova il segnaposto.

```plaintext
api.addQuickAccessProfileItem({
  icon: "pencil",
  href: "/somewhere",
  content: I18n.t("user.somewhere")
})

```

Quindi, il risultato dovrebbe apparire così:

```js
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
 api.addQuickAccessProfileItem({
  icon: "pencil",
  href: "/somewhere",
  content: I18n.t("user.somewhere")
 })
});

```

Sopra, avevo accidentalmente copiato una delle righe predefinite.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [26 Dicembre 2025, 8:57pm UTC](https://meta.discourse.org/t/add-new-item-to-user-dropdown-menu/389755/5 "2025-12-26T20:57:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
