做一个在后台显示的内容的简单模块
来源:互联网 发布:godaddy域名续费贵啊 编辑:程序博客网 时间:2024/04/29 22:24
在menu做好的基础上!!!!
1
app/etc/modules
2
app/code/community/AQ/Gao/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<AQ_Gao>
<version>0.1.21</version>
</AQ_Gao>
</modules>
<frontend>
<routers>
<gao>
<use>standard</use>
<args>
<module>AQ_Gao</module>
<frontName>gao</frontName>
</args>
</gao>
</routers>
</frontend>
<admin>
<routers>
<gao_admin>
<use>admin</use>
<args>
<module>AQ_Gao</module>
<frontName>gao_admin</frontName>
</args>
</gao_admin>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<gao>
<file>aq_gao.xml</file>
</gao>
</updates>
</layout>
</adminhtml>
<global>
<helpers>
<gao>
<class>AQ_Gao_Helper</class>
</gao>
</helpers>
<blocks>
<gao>
<class>AQ_Gao_Block</class>
</gao>
</blocks>
</global>
</config>
在此文件中,blocks,helps,adminhtml(xml文件),admin--routers都是必须要有的。
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>
<layout>
<updates>
<gao>
<file>aq_gao.xml</file>
</gao>
</updates>
</layout>
</config>
配置好!
4
app/design/adminhtml/default/default/layout/aq_gao.xml
<?xml version="1.0" ?>
<layout version="0.1.0">
<default>
<reference name="head">
</reference>
</default>
<gao_admin_index_bao>
<update handle="editor" />
<reference name="content">
<block type="core/template" name="index" template="gao/terry.phtml" />
</reference>
</gao_admin_index_bao>
</layout>
5
app/design/adminhtml/default/default/template/gao/terry.phtml
<div>
good.very good!
</div>
进入后台访问,可以看到内容部分显示出来“good.very good!”,OK!
- 做一个在后台显示的内容的简单模块
- 在后台控制一个a标签或者button(控件)的显示与否,或者禁用与否
- 【discuzx2】在后台添加自定义DIY模块的方法
- 动态创建输入框,在后台获取输入的内容
- 在前台显示,并且在后台可以配置的静态块.txt
- 曾经做的一个需求:如果一个应用在后台运行超过三小时,系统自动杀掉这个应用 以释放内存 来达到内存优化的目的
- 用frammark将页面需要的内容在后台封装后传入到前台封装:
- html提交表单,php在后台获取表单内容的方法_例1
- 线程的应用,在后台搜索目录
- 在后台怎样修改数据源的"whereClause"
- 在后台执行前台的方法
- 系统运行在后台的Notification
- php在后台执行的方法
- 前台接收的数据在后台乱码
- .NET的GridView在后台删除数据
- Unity3D在后台打包的方法
- 程序在后台运行的注意
- checkbox在后台java的获取方法
- 2.6 内核模块的Makefile模板
- 中心极限定理(central limit theorem)
- TCP/IP网络编程函数解析
- 【转】C语言中实现循环移位
- Django下载大文件和压缩zip文件
- 做一个在后台显示的内容的简单模块
- Repater无刷新分页(UpdatePanel)
- SuperNotCalledException
- JAVA中类加载器的高级应用
- linux0.11使用nasm改写汇编部分
- IIS 7.5 使用网络路径
- mssql查找备注(text,ntext)类型字段为空的方法
- 蒋涛:技术大变革时代 开发者迎来黄金十年
- Java的内存泄露(转)