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 :
- each (also see Stubber each)
- if (also see Stubber if)
- unless
- with
- lookup (use the Stubber dynamic_lookup helper instead)
- log
Comments
You can also add comments to your handlebars templates using the following syntax: