问题
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?
回答1:
Praveen,Please try this
<?php echo $this->getBlockHtml('media') ?>
Instead of
<?php getChildHtml(‘media’) ?
>
as per as your code $this missing
来源:https://stackoverflow.com/questions/29763228/getchildhtml-media-returning-blank-in-view-phtml-magento