# How to register a helper in Discourse?

**URL:** <https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904>\
**Category:** Development\
**Created:** [April 1, 2016, 6:09pm UTC](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904 "2016-04-01T18:09:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [April 4, 2016, 9:05am UTC](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904/2 "2016-04-04T09:05:24Z")

</div>

What would `customHelper` do? Can’t you just do something like this instead?

in your initializer

```js
export default {
  initialize(container) {
    const user = container.lookup('current-user:main');
    Discourse.ajax("/some-url").then(result => user.set("isPartOfParticularGroup", true));
  }
}

```

and in your `.hbs` file

```handlebars
{{#if currentUser.isPartOfParticularGroup}}
   // your stuff
{{/if}

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904)._
