Stacks API

Come build with us.
Stacks API v11 for Stacks 4.0


  <   Property List Reference


This content is open source. You can edit it and submit a pull request on GitHub.
This page is generated from this file.


© . YourHead Software all rights reserved.

Template Files — templates

Available: Stacks API v5

An array of template dictionaries.

Assets vs. Templates vs. Libraries

Assets, Templates, and Libraries are similar. Each can contain content and files to be published. But each imply different behavior and should be used differently.

Assets

Assets are NOT processed for templates. They are NOT included in edit-mode. Assets should be used whenever possible. They are simple and low-cost.

Libraries

Libraries are NOT processed for templates. Some libraries are included in edit-mode. Some libraries are built-in to stacks (e.g. jQuery and FontAwesome). Libraries are shared between all stacks on the site/page. Use a library whenever you need to share common content between stacks.

Templates

Templates ARE processed for template variables. Some templates are included in edit-mode. Since templates must be processed you should include as few templates as possible – move as much of your content to assets or libraries whenever you can.

Template Dictionary

Each line in the templates array should be a dictionary. And each dictionary should represent a single template file that should be processed.

Each template file and each tempalte variable within each file adds a significant performance cost to your stack. To ensure your stack has the best peformance strive to include as few template files as possible with as few templates variables as possible.

The template dictionary can include the following keys:

Filename – key: filename

The filename of the template. Do not include the path to the file.

File type – key: type

This can be any of the following:

Scope – key: scope

The scope of a template determins where on the page/file it will be published, as well as which template variables will be processed.

Limited Scopes – These scopes are limited to specific types of content
© . YourHead Software all rights reserved.