Web Analytics

Fill the form & Get Installation Support

Any Question or Concerns?
Let's discuss





    Magento 2 controller override

    Related articles

    It is a quite simple tutorial with 2 steps:

    Step 1:

    Create di.xml file at app/code/[Name space]/[Your Module]/etc

    In this example, we will rewrite controller Magento/Cms/Controller/Index/Index. In which, [Name Space]\[Your Module]\Controller\Cms\Index will be used to override Magento\Cms\Controller\index\Index –the homepage in original Magento 2.

    Step 2: Define an overriding controller class

    You need to create Index.php in app/code/[Name Space]/your Module]/Controller/Index

    Done! I’m sure that you can follow this tutorial without any difficulty.

    Contact us for scientific strategies to increase your site conversions





      Connect With Us