Question

Here is the config.xml

<admin>
    <routers>
            <adminhtml>
                        <args>
                            <modules>
                                <Example_Csfollowup before="Mage_Adminhtml">Example_Csfollowup_Adminhtml</Example_Csfollowup>
                            </modules>
                        </args>
            </adminhtml>
    </routers>
</admin>

here is the controllers at app\code\local\Example\Csfollowup\controllers\Adminhtml\CustomController.php

class Example_Csfollowup_Adminhtml_CustomController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {

        echo 'abc';

        //$this->renderLayout();
    }

    public function listAction()
    {

    }
}

but when i visit localhost/m1/index.php/admin/custom, it redirect me to 404, anyone know what is the url it should be?

Was it helpful?

Solution

Try adding a menu and add link inside it, Magento admin will check for security key value in URL, if its not correct or missing, it will redirect you to dashboard page.

Add adminhtml.xml in your module's etc folder.

<?xml version="1.0"?>
<config>
    <menu>
        <csfollowup module="csfollowup">
            <title>CS Follow</title>
            <sort_order>100</sort_order>               
            <children>
                <items module="csfollowup">
                    <title>My Page</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/custom</action>
                </items>
            </children>
        </csfollowup>
    </menu>
</config>
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top