您的位置:首页 > 其它

magento-----建立后台菜单项

2011-01-27 01:21 127 查看
1

app/etc/modules/......xml

2

app/code/community/AQ/Gao/etc/config.xml

app/code/community/AQ/Gao/etc/adminhtml.xml

app/code/community/AQ/Gao/Helper/Data.php

3

3.1

app/code/community/AQ/Gao/Helper/Data.php

--------------->

<?php

class AQ_Gao_Helper_Data extends Mage_Core_Helper_Abstract{

}

?>

3.2

app/code/community/AQ/Gao/etc/config.xml

--------------->

<?xml version="1.0"?>

<config>

<modules>

<AQ_Gao>

<version>1.0.21</version>

</AQ_Gao>

</modules>

<global>

<helpers>

<gao>

<class>AQ_Gao_Helper</class>

</gao>

</helpers>

</global>

</config>

3.3

app/code/community/AQ/Gao/etc/adminhtml.xml

-------------------->

<?xml version="1.0" encoding="UTF-8"?>

<config>

<menu>

<gao module="gao">

<title>TerryTest11</title>

<sort_order>51</sort_order>

<children>

<aa module="gao">

<title>Bao</title>

<sort_order>0</sort_order>

<action>gao_admin/index/bao</action>

</aa>

<posts module="gao">

<title>Kun</title>

<sort_order>1</sort_order>

<action>gao_admin/index/kun</action>

</posts>

</children>

</gao>

</menu>

<acl>

<resources>

<all>

<title>Allow Everything</title>

</all>

<admin>

<children>

<gao>

<title>TerryTest11</title>

<sort_order>51</sort_order>

<children>

<aa>

<title>Bao</title>

<sort_order>0</sort_order>

</aa>

<posts>

<title>Kun</title>

<sort_order>1</sort_order>

</posts>

</children>

</gao>

</children>

</admin>

</resources>

</acl>

</config>

注意事项:

1

adminhtml.xml中

<config>

<menu>

<gao module="gao">

此标签为module的名字,必须为gao。

2

helper/data.php。一定要有,否则会报错
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: