Global References

A global reference refers to a data value passed in to your template. They are always evaluated on the top-level scope, and can be placed anywhere in your template.

Basic syntax:

{{referencekey}}

Overview

Put a global reference between the opening and closing delimeters (by default {{and }}). Since Squirrelly templates parse into JavaScript, you can write a reference using dot notation: <p>This is the child of an object: {{user.lastName}} or bracket notation: <p>This is the child of an object: {{user['lastName']}}.

warning

There can be spaces after the tag start (default {{{}) and before a tag close (default {}}}), but any reference that doesn't point to an actual value, like {{{hi people}}}, will make your code break!