Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8444827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:29:52+00:00 2026-06-10T09:29:52+00:00

I added admin controller. This code works correct: <admin> <routers> <adminhtml> <args> <modules> <mycompany_mymodule>Mycompany_Mymodule_Adminhtml</mycompany_mymodule

  • 0

I added admin controller.
This code works correct:

    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <mycompany_mymodule>Mycompany_Mymodule_Adminhtml</mycompany_mymodule >
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

If I add before=”Mage_Adminhtml” to mycompany_mymodule:

<mycompany_mymodule before="Mage_Adminhtml">Mycompany_Mymodule_Adminhtml</mycompany_mymodule >

then it doesn’t work – got 404 error.

1. What does this option do?

Also I looked throught Alans’ Storm article: http://alanstorm.com/magento_admin_controllers
There are example:

<config>
    <!-- ... -->
    <admin>
        <routers>
            <the_name_of_this_element_is_not_important_it_should_be_unique>
                <use>admin</use>
                <args>
                    <module>Alanstormdotcom_Adminhelloworld</module>
                    <frontName>adminhelloworld</frontName>
                </args>
            </the_name_of_this_element_is_not_important_it_should_be_unique>
        </routers>
    </admin>
    <!-- ... -->        
</config>

2. What is the difference between these definitions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:29:53+00:00Added an answer on June 10, 2026 at 9:29 am

    It solved:

    I found Mage_Core_Controller_Varien_Router_Standard class where collectRoutes() method is defined. It parses “after” and “before” parameters to order the modules.

    This method is calling from Mage_Core_Controller_Varien_Router_Admin (started from init method in Mage_Core_Controller_Varien_Front).

    So after I looked through match process in Mage_Core_Controller_Varien_Router_Standard.

    After Mage_Core_Controller_Varien_Router_Standard debuging I understood my fault.

    1. I used Index controller instead of MyModuleContoller.

    2. Alan Storm defined controller which is not under the admin module (i.e. adminhtml). When I use first config – it works perfect because I defined new modules under the section adminhtml. In Alan’s config I cannot add my module to adminhtml. I could override it but it is not correct because other modules under the adminhtml will be removed then.

    This is correct code for menu under the adminhtml:

        <admin>
            <routers>
                <adminhtml>
                    <args>
                        <modules>
                            <mycompany_mymodule after="Mage_Adminhtml">Mycompany_Mymodule_Adminhtml</mycompany_mymodule >
                        </modules>
                    </args>
                </adminhtml>
            </routers>
        </admin>
    

    Inchoo also described this config here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I added this part of the code in my onCreate() method and it crashes
I have added the Authentication attribute on controller classes which are for admin purposes
This Ruby on Rails problem is a bit vexing, as the code works fine
I am using rails 3.2 and devise 1.5.3. I added an admin attribute in
This question has been asked many times before, but they all seem to relate
So I have to admit, that I had this code working perfectly up until
I have just added a new Admin area to my project as its started
I added an admin role to Devise by adding a admin attribute. Could you
In one of the controller, I need a specific layout. I added layout at
In Magento, when a new customer is added (admin -> manage customers -> account

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.