Skip to content

Instantly share code, notes, and snippets.

@adobi
Last active March 24, 2016 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adobi/eb2ce0d172914f0bc95f to your computer and use it in GitHub Desktop.
Save adobi/eb2ce0d172914f0bc95f to your computer and use it in GitHub Desktop.
Magenot custom router IndexController.php
class Modeul_Name_IndexController extends Mage_Core_Controller_Front_Action
{
private $params = [];
public function __construct(
Zend_Controller_Request_Abstract $request,
Zend_Controller_Response_Abstract $response,
array $invokeArgs = array()
) {
parent::__construct($request, $response, $invokeArgs);
}
public function indexAction()
{
$this->render();
}
private function render()
{
$this->loadLayout();
$this->getLayout()->getBlock('module_index')->assign('data', $this->params);
$this->renderLayout();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment