Twig Functions

  • add_schema_org

    Adds JSON-LD metadata to the current page.

  • attrs

    Use the attrs() Twig function to fluently manage HTML attributes using the HtmlAttributes class.

  • backend_icon

    Helper function include an icon in the back end.

  • contao_figure

    Renders a figure for image processing.

  • contao_section

    Renders a layout section.

  • contao_sections

    Renders custom layout sections of a specific type.

  • content_element

    Renders a content element either by a reference - or on-the-fly.

  • content_url

    Generates the URL for a given model object.

  • csp_hash

    Adds CSP hashes for inline styles and scripts.

  • csp_nonce

    Adds CSP nonces for inline styles and scripts.

  • csp_source

    Adds a source for a CSP directive.

  • figure

    Creates a figure object for image processing.

  • frontend_module

    Renders a front end module either by a reference - or on-the-fly.

  • insert_tag

    Allows you to render an insert tag directly.

  • picture_config

    Creates a picture configuration on-the-fly.

  • prefix_url

    Prefixes relative URLs with the base path.

  • slot

    Note

    This is not yet documented.