References (Interpolate)

A reference (what doT would call an interpolation) outputs data into the template.

Basic Syntax

{{ reference }}


Put a reference between the opening and closing delimeters (by default {{and }}).

The data you call a template with is stored in an object named it by default.

Since Squirrelly templates parse into JavaScript, you can write a reference using dot notation: <p>User's last name: {{it.user.lastName}} or bracket notation: <p>User's last name: {{it.user['lastName']}}.


You can unescape a reference by putting * after the opening delimeters (ex. {{* unescapedSomething }})


There can be spaces after the tag start (default {{) and before a tag close (default }})