I would like to add a new menu to the backend. I would like to show my own layout when clicked on it.
I know that there is quick and dirty way, adding it on the menu.phtml file. But I don’t want to do it. Because I don’t want to maintain magento’s main code with every change I have done.
So here comes the question, how can I do it with extending core classes and creating a new module or something in local part of magento?
I have tracked the code to Mage_Adminhtml_Block_Page_Menu class, which creates a list of menu elements, from /app/code/core/Mage/Admin/etc/admin.xml
I may have to edit this file manually, which I don’t want to do this too. What I do really want to do perhaps, overwrite the core’s menu class (to tell magento to use my own menu class instead of Mage’s) and then extend a new class from the core class and modify the menu items according to a different additional_menu_items.xml file which I will define in the local module folder. Or perhaps I will add it manually to the array, but I guess an xml file will be cleaner
Then I want to show something I have previously defined (where can I define it?:) in the middle part of the admin page. I, of course, want to keep the top menu and bottom copyright part and show up a page I have created previously there?
I’m not totally sure how to do it. I really appreciate some help. No need to tell everything I have to do (but a tutorial like wiki entry would be great!) but I need some clues to do it. Like look here on how to overwrite mage core classes and look here for custom layouts etc.
But the problem is, I was unable to set an html file to this menu. So it shows a 404 on the middle (header and footer are protected and 404 shows in the middle of them just like I wanted, cool:).
nearly 2 months have passed and I was able to move on just a little bit.
I found out that there were some things about controllers. I was trying to move on from dashboard example but I’m kind of lost as I cannot figure out how to call that controller or how that controller actually calls my class and other things.