Home  >  Article  >  Backend Development  >  关于smarty模块,该怎么处理

关于smarty模块,该怎么处理

WBOY
WBOYOriginal
2016-06-13 10:11:13907browse

关于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在哪了。

Statement:
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