Template rendering strategy
: shell
: template-rendering-strategy
: rendering-strategy
: /modules/core/ui/services/template-rendering-strategy.js
TemplateRenderingStrategy
Kind: global class
new TemplateRenderingStrategy(scope)
A rendering strategy that uses templates files, going through view engines.
Param | Type | Description |
---|---|---|
scope | object |
The scope. |
templateRenderingStrategy.render(context, done)
Uses templates to recursively render shapes into HTML.
The method resolves templates based on module and theme dependencies and priorities.
Each shape can also have a list of alternate template names that will take precedence over the shape name to resolve a template name, if found.
Kind: instance method of TemplateRenderingStrategy
Param | Type | Description |
---|---|---|
context | object |
The context. |
context.shape | object |
The shape to render. |
[context.shapeName] | string |
The name of the shape to render. If not specified, context.shape.meta.type will be used, and if that is not found, 'zone' is used. |
context.renderStream | object |
The render stream. |
done | function |
The callback. |