# How to add helper for connector?

**URL:** https://meta.discourse.org/t/how-to-add-helper-for-connector/54745
**Category:** Development
**Created:** [December 24, 2016, 1:52pm UTC](https://meta.discourse.org/t/how-to-add-helper-for-connector/54745 "2016-12-24T13:52:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alavi1412](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alavi1412/32/67721_2.png) [@Alavi1412](https://meta.discourse.org/u/Alavi1412)
#### Post date: [December 24, 2016, 1:52pm UTC](https://meta.discourse.org/t/how-to-add-helper-for-connector/54745/1 "2016-12-24T13:52:07Z")

</div>

How can I add add helpers for a connector in templates folder for an outlet?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [December 24, 2016, 8:50pm UTC](https://meta.discourse.org/t/how-to-add-helper-for-connector/54745/2 "2016-12-24T20:50:01Z")

</div>

This is a year old and I haven’t revisited it since so be warned YMMV.

In plugin.rb I registered the helper file.  
`register_asset "javascripts/helpers/post-image-links.js.es6"`  
\* may not be necessary, as “es6” files are auto-magically included.

The es6 helper file had the script stuff

```plaintext
Ember.Handlebars.helper('post-image-links', function(param) {
  var output = " ";
⋮
	return output;
});

```

and the connector hbs

```plaintext
{{#if Discourse.SiteSettings.post_image_links_active}}
  <div class="post-image-links">
    {{#if cooked}}
      {{#if (post-image-links) }}
        {{{ post-image-links cooked }}}
      {{/if}}
    {{/if}}
  </div>
{{/if}}

```

which went into a hacked post.hbs file

```plaintext
⋮
        <div class='cooked'>
          {{{cooked}}}
	  {{plugin-outlet "in-cooked"}}
          {{#if firstPost}}
            {{plugin-outlet "topic-after-cooked"}}
          {{/if}}
        </div>
⋮

```
