getChildHtml('media')在view.phtml magento中返回空白 [英] getChildHtml(‘media’) returning blank in view.phtml magento

查看:109
本文介绍了getChildHtml('media')在view.phtml magento中返回空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到昨天一切都很好,突然<?php getChildHtml('media')?> 在<$ c $中没有返回任何html空白c> view.phtml。
我检查了catalog.xml文件:

Till yesterday all was fine, all of sudden<?php getChildHtml(‘media’) ?> is not returning any html just blank in view.phtml. I checked catalog.xml file:

<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml" />
</block>
</reference>

我需要检查哪些地方让它再次运行?

Where else I need to check to make it run again?

推荐答案

Praveen,请试试这个

Praveen,Please try this

<?php echo $this->getBlockHtml('media') ?>

而不是

<?php getChildHtml('media')?>

根据您的代码$ this this missing

这篇关于getChildHtml('media')在view.phtml magento中返回空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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