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


Syntax

renderStr(string $str, ?array $params = null): string

  • $str - string
    The twig-template given as string.

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


Examples


{{ hublify.renderStr( 'Result is: {{ 1+1 }}!' }}      =>    "Result is: 2!"