this is my code: etc/adminhtml.xml:

<?xml version="1.0"?>
        <attributegrouping translate="title">
            <title>Attribute Grouping</title>
                <system_configuration translate="title" module="attributegrouping">
                    <title>Add new group</title>

this is the etc/config.xml :

<?xml version="1.0"?>


this is the controllers/AddgroupController.php content:


class Netgroup_Attributegrouping_Adminhtml_AddgroupController extends Mage_Adminhtml_Controller_Action
        public function indexAction() 
                echo 1;


I want when i click on the "Add new group" in admin menu, to go to a controller function and display smth. in my case to the indexAction from class Netgroup_Attributegrouping_Adminhtml_AddgroupController. How should i do that ? thx

1 Answer 1


Change the <action> tag in your menu to

First add this in your config.xml as a sibling to the <global> tag. This will register your route.

                    <Netgroup_Attributegrouping before="Mage_Adminhtml">Netgroup_Attributegrouping_Adminhtml</Netgroup_Attributegrouping>

Then change the <action> for your menu item from adminhmtl.xml to


And one more thing. Make sure the class Netgroup_Attributegrouping_Adminhtml_AddgroupController is located in Netgroup/Attributegrouping/controllers/Adminhtml/AddgroupController.php

  • what before="Mage_Adminhtml" does it mean ? Commented Jul 24, 2014 at 10:28
  • @Chester. It means that before looking for a controller in Mage_Adminhtml it will look for one in your module.
    – Marius
    Commented Jul 24, 2014 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.