# Using a Discourse component in a plugin

**URL:** <https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155>\
**Category:** Development\
**Created:** [January 22, 2017, 7:33am 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:** 2

<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:** [January 22, 2017, 7:48pm UTC](https://meta.discourse.org/t/using-a-discourse-component-in-a-plugin/56155/2 "2017-01-22T19:48:36Z")

</div>

I just dropped this into a handlebars template out of curiosity:

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

```

It worked like a charm. It gave me a “Sign Up” button that displayed the account creation modal. Note that this works when the template is specific to the plugin and not through a connector.

That said, if I do the same thing in a handlebars template that is using a `plugin-outlet` through a connector, it fails. Makes me think the connector templates aren’t inheriting actions from above. @eviltrout, is there any truth to that? That would be good to know. Even templates that have [the action available](https://github.com/discourse/discourse/blob/05e99a68cec550eb3b1aa9703bdca462e74303e7/app/assets/javascripts/discourse/templates/static.hbs) _and_ a `plugin-outlet` fail when the connector is used.

On another note, try inserting `{{signup-cta}}` in your handlebars file. See if that’s something you’re interested in.

---

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