自定义前端页面文件路径

系统插件功能的页面文件是系统根据当前页面action自动寻找的,如果开发者要用到的页面文件路径不是默认路径,则可根据本文的方法指定页面文件路径。

方法:template_url()

代码示例:

$return['htmls']=$this->template_url('common/detail');

参数说明:

本方法的参数为要用到的页面文件的相对路径。

例如,上例中,如果页面是管理端PC端页面。指定的页面文件实际路径为:

    /addons/plugin_name/manage/templates/windows/common/detail.html

其中,/addons/plugin_name/manage/templates/windows为插件管理端pc页面文件目录。

可以看到,参数“common/detail”是该绝对路径掐头去尾的结果

返回

条结果""