Add twig function to allow render component in twig templates

Created on 27 September 2023, about 1 year ago

Problem/Motivation

Making this via an issue so the improvement is more visible. This allows to render components in twig templates and pass any required configuration.

Example:
In your twig template you can do

{{ example_component({ 'title': 'Example Component'|t }) }}
<div>
  <p>{% trans %}Calling example component 2{% endtrans%}</p>
  {{ example_component_2({ 'title': 'Example Component 2'|t }) }}
</div>

So just rendering it via the component name and passing configuration as an object.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇷Argentina emacoti

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024