Renders a template, requested by its Hublify-CMS's Id, within the current render-engine-environment.

This is basically like the common twig-INCLUDE function - with the exception that this function does file-path lookup beforehand.

Syntax

renderTemplateById(string $tpl_id, ?array $params = null): string

  • $tpl_id - string
    The Hublify-CMS's template-id. The template's file-path is looked up in the Hublify CMS and then rendered.

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


Examples


{{ hublify.renderTemplateById("tpl-0000-1111-2222-3333") }}