模块开发: Difference between revisions

Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
Line 421: Line 421:
</syntaxhighlight>
</syntaxhighlight>


===Overwrite template file (tpl)===
===覆盖模板文件 (tpl)===
If you want to overwrite tpl file on your module, you need to declare it on the module_parts :
如果您想覆盖模块上的tpl文件,则需要在 module_parts 上声明它:
 
<syntaxhighlight lang="PHP">
<syntaxhighlight lang="PHP">
'tpl' => 1,
'tpl' => 1,
</syntaxhighlight>
</syntaxhighlight>
Then you can put any tpl file on '''mymodule/core/tpl'''
 
as soon as the module is activate, the tpl will be overwrited
然后您可以在 '''mymodule/core/tpl''' 上放置任何tpl文件。
 
一旦模块被激活,tpl就会被覆盖。


==设置配置页面 (可选)==
==设置配置页面 (可选)==
Line 444: Line 447:
$this->config_page_url = array("setup.php@mymodule");
$this->config_page_url = array("setup.php@mymodule");
</source>
</source>
===测试您的页面===
转到“配置->模块”页面,您必须看到一个图标,允许您访问配置页面,并且您必须能够修改这些选项并将其保留在数据库中。


===修改模块主文件===
===修改模块主文件===
715

edits

Navigation menu