# Using a Discourse component in a plugin

**URL:** <https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155>\
**Category:** Development\
**Created:** [22 يناير 2017، 7:33ص UTC](https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155 "2017-01-22T07:33:38Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)\
**Post date:** [26 يناير 2017، 4:07م UTC](https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155/20 "2017-01-26T16:07:23Z")

</div>

> [@eviltrout](#):
>
> Looks like this.send is just caling the same showCreateAccount method over and over 🙂

Doh! That resolved it. It works! Thanks for sticking with me on this one.

Here’s a screen of this. You can see the sign up button in the background.

 ![](https://global.discourse-cdn.com/meta/original/3X/c/e/ce3be58cc63a52be3212f6d5eb5188027a977cd4.jpg)

Just for clarification purposes and for anyone who wants to submit a PR for their specific case, this is the setup:

discourse/app/assets/javascripts/discourse/controllers/static.js.es6

```javascript
showCreate(){
  this.send("showCreateAccount");
}

```

discourse/app/assets/javascripts/discourse/templates/static.hbs

```handlebars
{{plugin-outlet name="above-static" args=(hash model=model showCreateAccount=(action "showCreate"))}}

```

my-plugin/assets/javascripts/discourse/templates/connectors/above-static/temp.hbs

```handlebars
{{d-button action=showCreateAccount class="btn-primary btn-large sign-up-button" label="signup_cta.sign_up" }}

```

---

_[View the full topic](https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155)._
