# How to register a helper in Discourse?

**URL:** <https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904>\
**Category:** Development\
**Created:** [1. April 2016 um 18:09 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:** 1

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [1. April 2016 um 18:09 UTC](https://meta.discourse.org/t/how-to-register-a-helper-in-discourse/41904/1 "2016-04-01T18:09:46Z")

</div>

I’m trying to figure out the best way to register a handlebars helper for my Discourse plugin.

I have an ajax call in my initializer that determines whether the currentUser is part of a particular group. If they are, then they get an extra nav item.

I wanted to do something like this in my hbs file for the nav:

```
{{#if customHelper}}
//show nav item
{{/if}}

```

My other theories on how to do this:

1. Keep the logic in the initializer and use jquery to append the item to the nav.
2. Create a component for the nav item to only be displayed given the aforementioned logic.

So do you think registering a helper is the best to go, if so how? Or are one of my other approached better.

Thanks for any help or advise!

---

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