Magento at its core is a Model-View-Controller (MVC) framework. So, in order to make our new route functional, we have to create a new controller that will respond to this specific route. To do so, follow these steps:
Navigate to the extension root directory.
Create a new folder called
controllers
.Inside the
controllers
folder, create a file calledIndexController.php
.Copy the following code (the file location is
app/code/local/Mdg/Hello/controllers/IndexController.php
):<?php class Mdg_Hello_IndexController extends Mage_Core_Controller_Front_Action { public function indexAction() { echo ‘Hello World this is the default action’; } }