This namespace contains initialization functionalities.
Methods
-
(static) Init()
-
Init the engine environment.
-
(static) Load(TemplateData)
-
Load all template files for later use.
Parameters:
Name Type Description TemplateData
Object contains the objectified template data as provided by the loader -
(static) Render(TemplateName, Data) → {String}
-
Render a template with the given data.
Parameters:
Name Type Description TemplateName
String The name of the templated which should be used for rendering as of Core.Template.LoadTemplates() Data
Object the data which should be used for rendering (optional) Returns:
- the rendering result- Type
- String
Example
Core.Template.Render('MetaFloater', { 'Variable' : 'String', 'Another' : 'Another String' }); For more examples and possibilities, see the Nunjucks documentation.
-
(static) RenderString(TemplateString, Data) → {String}
-
Render a string with the given data.
Parameters:
Name Type Description TemplateString
String The string which should be used for rendering as of Core.Template.LoadTemplates() Data
Object the data which should be used for rendering Returns:
- the rendering result- Type
- String