Details
-
Story
-
Resolution: Unresolved
-
High
-
None
-
2.5.0
-
5
Description
The only possible way to do it is to render a controller in custom tag template. There should be a more simple and flexible solution.
We should allow Developers to configure for each Custom Tag (or Style for that matter) either a controller or renderer which will take over the responsibility of rendering template. Depending on overhead it might be something lighter than fully-featured Symfony controller, but that needs to be discovered during development unfortunately.
Before:
ezrichtext: custom_tags: my_tag: template: '@MyBundle/my_tag.html.twig' # ...
After:
ezrichtext: custom_tags: my_tag: template: '@MyBundle/my_tag.html.twig' controller: 'MyBundle:renderTag' # ...
Or simpler:
ezrichtext: custom_tags: my_tag: controller: 'MyBundle:renderTag' # ...
Alternative solution for renderer - TBD.