/workspace/getTemplate
The module exports the getTemplate method which is required by the query, languageTemplates, getLayer, and getLocale modules.
Requires
Methods
(async, inner) getTemplate(template) → {Promise.<(Object|Error)>}
The workspace will checked and cached by the Workspace API checkWorkspaceCache method.
A template object matching the template_key param in the workspace.templates{} object will be returned from the getTemplate method.
The template will be retrieved from its src if not cached.
Module templates will be constructed before being returned.
Parameters:
Name | Type | Description |
---|---|---|
template | string |
Returns:
JSON Template
- Type:
- Promise.<(Object|Error)>