Handlebars - Utility Helpers

Mat Bradley-Tschirgi

Table of Contents

Utility Helpers are optimized for fallback chains. They allow you to compare values in the following ways:

    • default - Returns the first non-empty value from a list of arguments; extremely useful for providing fallback chains. 
        • Syntax: {{default field1 field2 field3 "final fallback"}}
          • Example: <p>Visit our {{default [Preferred-Store] [Nearest-Store] "online store"}} today!</p>
The Pinpointe Playbook