- Issue created by @pdureau
- Merge request !51Issue #3489965 by pdureau, g4mbini: [4.0.0-alpha7] Replace component() function by include() → (Merged) created by G4MBINI
Automatically closed - issue fixed for 2 weeks with no activity.
Since UI Patterns 2.0.0-beta5 (Thursday 28 November) and 📌 [2.0.0-alpha3] Replace component() function by native Twig mechanisms? Active , we are promoting the use of Twig include function: https://twig.symfony.com/doc/3.x/functions/include.html
In UI Patterns 2.0.0-rc1, we will remove our custom component()
function.
Replace all usages of:
{{ component('my-theme:my_component', {
my_slot_1: content,
my_slot_2: "Lorem ipsum",
}, {
my_prop_1: foo,
my_prop_2: true,
}) }}
By:
{{ include('my-theme:my_component', {
my_prop_1: foo,
my_prop_2: true,
my_slot_1: content,
my_slot_2: "Lorem ipsum",
}, with_context = false) }}
2 main differences:
with_context = false
is necessary to avoid unexpected variables in the component templateActive
4.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.