Skip to content

Handlebars Helpers

ADL templates are written in Handlebars. On top of the standard Handlebars syntax, ADL registers a set of helper functions that make working with metadata easier: comparing strings, looking up extension properties, branching on classifications, generating stable identifiers, and so on.

These helpers can be used inside any template. For the concepts, see Templates & Code Generation.

  • hasClassification: branch on whether a classification with a given name is present.
  • hasClassificationGroup: branch on whether any classification in a given group is present.
  • hasStringValue: branch on whether a value exists in a list of strings.
  • {{*filter}}: filter a list before iterating it in an each block.
  • {{*order}}: sort a list before iterating it in an each block.

The helpers are registered by ADL’s generation engine when templates are rendered, both in the app and during automated generation runs.