# Using Plugin Outlet Connectors from a Theme or Plugin

**URL:** https://meta.discourse.org/t/using-plugin-outlet-connectors-from-a-theme-or-plugin/32727
**Category:** Developer Guides
**Tags:** how-to, code
**Created:** [August 31, 2015, 7:35am UTC](https://meta.discourse.org/t/using-plugin-outlet-connectors-from-a-theme-or-plugin/32727 "2015-08-31T07:35:05Z")
**Posts on this page:** 1
**Showing post:** 41

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [January 11, 2024, 6:14pm UTC](https://meta.discourse.org/t/using-plugin-outlet-connectors-from-a-theme-or-plugin/32727/41 "2024-01-11T18:14:04Z")

</div>

You can see an example here:

> <https://github.com/discourse/discourse-stat-banner/blob/main/javascripts/discourse/initializers/stat-banner.js#L5>

`StatBanner` is a native class defined in `components` directory:

> <https://github.com/discourse/discourse-stat-banner/blob/main/javascripts/discourse/components/stat-banner.gjs>

In your case, that would be `api.renderInOutlet("above-main-container", YourClass)`

I don’t think you can do it in the HEAD file. You should [split your code into multiple files](https://meta.discourse.org/t/split-up-theme-javascript-into-multiple-files/119369).

I encourage you to use [Discourse Theme CLI](https://meta.discourse.org/t/install-the-discourse-theme-cli-console-app-to-help-you-build-themes/82950) as it will be much easier to develop a Theme component!

Is your Theme Component public?

---

_[View the full topic](https://meta.discourse.org/t/using-plugin-outlet-connectors-from-a-theme-or-plugin/32727)._
