[TwigComponent] Allow specifying which template
to render in component()
Twig function
#2818
Labels
template
to render in component()
Twig function
#2818
Uh oh!
There was an error while loading. Please reload this page.
I have the same Twig component form that I need to render differently in two places. I can always use
EventListener
forPreRenderEvent
to adjust the template based on some variable, but it would be nice to have it built in. (I think this could be a built in thing, please tell me otherwise)I propose this syntax/change:
Where
_template
would be path to a different template, just like you can do usingPreRenderEvent::setTemplate()
.Basically adding this event listener by default:
The text was updated successfully, but these errors were encountered: