> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to create a custom helper?

- URL: https://getpublii.com/dev/how-to-create-a-custom-helper/
- Published: 2017-08-05T08:34:59.994Z
- Updated: 2024-02-08T09:35:31.879Z
- Description: Custom helpers can be created in the helpers.js file. It is useful if you need to create more complex conditions and you want to simplify…
- Author: Tomasz Dziuda
- Tags: Helpers

Custom helpers can be created in the **helpers.js** file. It is useful if you need to create more complex conditions and you want to simplify your theme structure.

It is necessary to create an object with functions which will define an output of the helper. The key values in the object are used as a helper names.

In the below example there is a **{{testHelper}}** defined, which accepts a one argument:

```javascript

/*
 * Custom theme helpers for Handlebars.js
 */

let themeHelpers = {
    testHelper: function(value) {
        return "Test output " + value;
    }
};

module.exports = themeHelpers;
```
