This namespace contains initialization functionalities.
- Source:
Methods
-
(static) Init()
-
Init the engine environment.
- Source:
-
(static) Load(TemplateData)
-
Load all template files for later use.
Parameters:
Name Type Description TemplateDataObject contains the objectified template data as provided by the loader - Source:
-
(static) Render(TemplateName, Data) → {String}
-
Render a template with the given data.
Parameters:
Name Type Description TemplateNameString The name of the templated which should be used for rendering as of Core.Template.LoadTemplates() DataObject the data which should be used for rendering (optional) - Source:
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 TemplateStringString The string which should be used for rendering as of Core.Template.LoadTemplates() DataObject the data which should be used for rendering - Source:
Returns:
- the rendering result- Type
- String