# Plugin template helper

**URL:** <https://meta.discourse.org/t/plugin-template-helper/51160>\
**Category:** Development\
**Created:** [October 6, 2016, 6:23am UTC](https://meta.discourse.org/t/plugin-template-helper/51160 "2016-10-06T06:23:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sevenmaxis](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)\
**Post date:** [October 6, 2016, 6:23am UTC](https://meta.discourse.org/t/plugin-template-helper/51160/1 "2016-10-06T06:23:43Z")

</div>

In my discourse plugin’s folder `discourse-adplugin/assets/discourse/helpers/` I’ve created a file with helper

`discourse-adplugin/assets/discourse/helpers/eq.js.es6`:

```
import { registerHelper } from 'discourse/lib/helpers';

var makeBoundHelper = Ember.HTMLBars.makeBoundHelper;

registerHelper('insert_ad', makeBoundHelper(function(params) {
  var dfp_top_3_display = Discourse.SiteSettings.dfp_top_3_display;

  if (dfp_top_3_display < 0) return false;

  return params[0] == dfp_top_3_display;
}))

```

I’m using this helper in template, in development environment it works well but in docker production it produces an error:

`Uncaught Error: Could not find module 'discourse/lib/helpers' imported from 'discourse/plugins/discourse-adplugin/discourse/helpers/eq'`

What is the right way to create template helpers in plugin?

---

_[View the full topic](https://meta.discourse.org/t/plugin-template-helper/51160)._
