Fetching contributors…
Cannot retrieve contributors at this time
28 lines (17 sloc) 1.02 KB
Shared Variables

Template Shared Variables

Template shared variables are available to all template definition config blocks, template views, and params. These variables are defined in the config/variables folder. The variables files are merely ruby scripts where instance variables (variables with an @ sign in front) are made available.

Here's an example:


@ami = "ami-base"

The @ami variable is now available to all of your templates. Effective use of shared variables can dramatically shorten down your template definitions.

Layering Support

Variables also support layering. {% include %}

More details on layering is covered in [Layering Support]({% link _docs/ %}).

Back Next Step

Pro tip: Use the <- and -> arrow keys to move back and forward.