关于smarty模块,该怎么处理

WBOY
Release: 2016-06-13 10:11:13
Original
906 people have browsed it

关于smarty模块
与smarty模块继承相反。

我现在想在一个模板A.tpl中嵌套B.tpl

且模板B有自己的php(程序)文件。

效果类似于c#中的控制器。

应该怎么做?

------解决方案--------------------
{include_php file="/path/to/load_nav.php"}
{include file="footer.tpl"}
------解决方案--------------------
将B.tpl中的模板变量display后赋予一个变量,在A.tpl中调用就行了。
当然大模块的话include。关键看你的display在哪了。

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!