Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
5.3, 2014.07, 5.4-dev
Description
Sometimes, we require a special controller action to be able to fully implement some blocks.
Considering that you can have many places where you can call subrequests to render your blocks, current situation of requiring custom controllers to be defined directly in subrequest call is quite inefficient.
This pull request adds the possiblity to specify which controller will be called for a specific block view match, much like defining custom controllers for location view or content view match.
Also, since there are two possible actions with which one can view a block: ez_page:viewBlock and ez_page:viewBlockById, this pull request also makes it possible to specify a controller action with a signature matching either one of original actions.
Example of configuration in ezpublish/config/ezpublish.yml:
ezpublish: system: eng_frontend_group: block_view: ContentGrid: template: NetgenSiteBundle:block:content_grid.html.twig controller: NetgenSiteBundle:Block:viewContentGridBlock match: Type: ContentGrid
Attachments
Issue Links
- relates to
-
EZP-24136 Backport support for overriding ez_page controller with block override rules
- Confirmed