1. Variable Substitution
  2. Handlebars Helpers

Variable Substitution

Handlebars Helpers

Handlebars helpers provide with some extra functionality for inline substitution.

Overview

Handlebars helpers provide with some extra functionality for inline substitution.
They allow you to do things like:

  • loop over objects or arrays
  • compare values for conditional output
  • convert from text to HTML and visa versa
  • generate ID
  • generate random numbers
  • generate Stubber Framework links

Custom Stubber Helpers

You can find a list of custom Stubber Helpers in the nested pages on this documentation.

Common custom helpers include:

  • eq for strict equality comparisons, often used with if
  • if_eq for strict equality comparisons as a block helper

Built-in Handlebars Helpers

You can find a list of built-in Handlebars Helpers on the Handlebars website.

Notable Handlebars official helpers are :

Comments

You can also add comments to your handlebars templates using the following syntax:

        {{! This is a comment }}