简体   繁体   English

getChildHtml('media')在view.phtml magento中返回空白

[英]getChildHtml(‘media’) returning blank in view.phtml magento

Till yesterday all was fine, all of sudden <?php getChildHtml('media') ?> is not returning any html just blank in view.phtml. 直到昨天一切都很好,突然所有<?php getChildHtml('media') ?>view.phtml.没有返回任何html只是空白view.phtml. I checked catalog.xml file: 我检查了catalog.xml文件:

<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,Please try this Praveen,请尝试这个

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

Instead of 代替

<?php getChildHtml('media') ? > >

as per as your code $this missing 根据您的代码$ this缺失

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM