Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23510

Add support for overriding ez_page controller with block override rules

    XMLWordPrintable

    Details

      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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                edi.modric Edi Modrić
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 minutes
                  5m