Renders a template within the current render-engine-environment.

This is basically like the common twig-INCLUDE function.

Syntax

renderTemplate(string $file, ?array $params = null): string

  • $file - string
    The full twig-file-path with leading namespace-prefix. E.g. "@hfyLib/path/to/myTemplate.html.twig".

  • $params
    Optional variables to be injected into that sub-render-process - on top level.


Examples


{{ hublify.renderTemplate("@hfyLib/path/to/myTemplate.html.twig") }}