在另一个.phtml页中显示.phtml页 [英] Display .phtml page in another .phtml page

查看:91
本文介绍了在另一个.phtml页中显示.phtml页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在catalog/product/new.phtml中创建了new.phtml页面. 其中包含new/latest products. 我还有另一个.phtml页[product_slider.phtml].我想将new.phtml添加到product_slider.phtml 这是possibale.如何使用..任何想法.?

I have created a new.phtml page in catalog/product/new.phtml. which contain new/latest products. i have another .phtml page [product_slider.phtml]. i want to add new.phtml into product_slider.phtml is this possibale.?? how to use.. any idea.?

推荐答案

答案

尝试代码后,我得到了解决方案.

After Trying the code i got the solution.

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('catalog/product/new.phtml')->toHtml(); ?>

这篇关于在另一个.phtml页中显示.phtml页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆