I'm creating simple Magento module based on this article.
I have a problem with my admin New Item action.
<?php
class Namespace_Gallery_Adminhtml_GalleryController extends Mage_Adminhtml_Controller_Action
{
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('namespace/gallery');
return $this;
}
public function indexAction()
{
$this->_initAction();
$this->_addContent($this->getLayout()->createBlock('gallery/adminhtml_gallery'));
$this->renderLayout();
}
public function editAction()
{
echo 'edit';
}
public function newAction()
{
$this->_forward('edit');
}
Items indexAction works and displays my items, when I click on any item it returns 'edit' as intended. Unfortunately clicking "Add new item" gives 404 (url is good).
Any ideas?