# Est-il possible de passer des paramètres à l'API qui crée des liens de communauté	?

**URL:** https://meta.discourse.org/t/is-it-possible-to-pass-params-to-the-api-that-creates-community-links/368857
**Category:** Development
**Created:** [Juin 4, 2025, 1:59 UTC](https://meta.discourse.org/t/is-it-possible-to-pass-params-to-the-api-that-creates-community-links/368857 "2025-06-04T13:59:01Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [Juin 4, 2025, 3:11 UTC](https://meta.discourse.org/t/is-it-possible-to-pass-params-to-the-api-that-creates-community-links/368857/3 "2025-06-04T15:11:49Z")

</div>

Plus précisément, je pense que c’est ici : [discourse/app/assets/javascripts/discourse/app/lib/sidebar/custom-community-section-links.js at d0c3f3b8fe6905e7e33ae4944cdf44c11ccc0df6 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/d0c3f3b8fe6905e7e33ae4944cdf44c11ccc0df6/app/assets/javascripts/discourse/app/lib/sidebar/custom-community-section-links.js)

Si nous ajoutons ceci, cela devrait fonctionner :

```js
get models() {
 return args.models;
}

```

> <https://github.com/discourse/discourse/pull/33070>
>
> Without this, you can't add a custom link like this...
> 
> \`\`\`js
> api.addCommunit…ySectionLink({
> name: "tag-link",
> route: "tag.show",
> title: "foo",
> text: "bar",
> models: \["baz"\]
> })
> \`\`\`
> 
> ...because the route needs a model

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-pass-params-to-the-api-that-creates-community-links/368857)._
