Home > php教程 > php手册 > 分组模式 模板文件跨分组include模板

分组模式 模板文件跨分组include模板

WBOY
Release: 2016-06-07 11:44:56
Original
985 people have browsed it

模板跨分组include模板 新版本没有这个功能 因实际需求新增了这个方法。在此备案以便日后查看
如:Home分组 User分组
在User分组内任意模板文件调用Home分组中任意模板文件(一般为公共模板文件 【常用公共文件header.html和Footer.html】)

修改文件/ThinkPHP/Lib/Template/ThinkTemplate.class.php

682行插入 (类方法parseTemplateName($templateName))if(!empty($paths)) {// 设置模板分组<br>                     $path = APP_PATH.C('APP_GROUP_PATH').C('TMPL_FILE_DEPR').array_pop($paths).'/Tpl/'.THEME_NAME.'/';<br>                 }

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template