0
votes

I am learning Magento Admin menu development. I am trying to develop a simple menu in Magento Admin Panel. My codes are as below

location of file: app/etc/modules/Alanstormdotcom_Helloworld.xml

<?xml version="1.0" encoding="utf-8"?>
<config>
    <modules>
        <Alanstormdotcom_Helloworld>
            <active>true</active>
            <codePool>local</codePool>
        </Alanstormdotcom_Helloworld>
    </modules>
</config>

location of file: app/code/local/Pulsestorm/Adminhello/etc/adminhtml.xml

<?xml version="1.0"?>
<config>
    <menu>
        <pulsestorm translate="title" module="pulsestorm_adminhello">
            <title>Pulse Storm</title>
            <sort_order>1</sort_order>
            <children>
                <example>
                    <title>Example</title>
                    <sort_order>1</sort_order>
                    <action>adminhtml/adminhello/index</action>
                </example>
            </children>
        </pulsestorm>
    </menu>
</config> 

location of file: app/code/local/Pulsestorm/Adminhello/etc/config.xml

<?xml version="1.0"?>
<config>
    <config>    
        <modules>
            <Alanstormdotcom_Helloworld>
                <version>0.1.0</version>
            </Alanstormdotcom_Helloworld>
        </modules>
    </config> 
    <global>
        <helpers>
            <pulsestorm_adminhello>
                <class>Pulsestorm_Adminhello_Helper</class>
            </pulsestorm_adminhello>
        </helpers>
    </global>
</config>

location of file: app/code/local/Pulsestorm/Adminhello/Helper/Data.php

<?php
class Pulsestorm_Adminhello_Helper_Data extends Mage_Core_Helper_Abstract
{
}

But I could not see any menu in my admin panel. what is the issue here?? Thanks

1

1 Answers

1
votes

You mixed two modules in one. Your config.xml is wrong.

it should be

<?xml version="1.0"?>
<config>
    <modules>
        <Pulsestorm_Adminhello>
            <version>1.0.0</version>
        </Pulsestorm_Adminhello>
    </modules>
        <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <Pulsestorm_Adminhello after="Mage_Adminhtml">Pulsestorm_Adminhello</Pulsestorm_Adminhello>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

    <global>
        <helpers>
            <pulsestorm_adminhello>
                <class>Pulsestorm_Adminhello_Helper</class>
            </pulsestorm_adminhello>
        </helpers>
    </global>
</config>

And app/etc/modules/Alanstormdotcom_Helloworld should be app/etc/modules/Alanstormdotcom_Helloworld.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Pulsestorm_Adminhello>
            <active>true</active>
            <codePool>local</codePool>
            <depends></depends>
        </Pulsestorm_Adminhello>
    </modules>
</config>

you can download this module from alanstorm.com