Magento通过本地xml向产品宣传资料中添加节无法正常工作
我跟随本文将产品评论添加到产品页面的辅助资料部分: 我已将以下代码添加到我的local.xml中:Magento通过本地xml向产品宣传资料中添加节无法正常工作,magento,magento-layout-xml,Magento,Magento Layout Xml,我跟随本文将产品评论添加到产品页面的辅助资料部分: 我已将以下代码添加到我的local.xml中: <catalog_product_view translate="label"> <reference name="content"> <block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" te
<catalog_product_view translate="label">
<reference name="content">
<block type="review/product_view_list" name="product.info.product_additional_data" as="product_review" template="review/product/view/list.phtml">
<block type="review/form" name="product.review.form" as="review_form"/>
</block>
</reference>
以及view.phtml中的以下代码:
<?php echo $this->getChildHtml('product_review') ?>
上述内容是在对getChildHtml的一些其他调用之间添加的(在辅助资料部分)
问题:评论和表格将添加到页面末尾,而不是辅助资料部分
感谢您的帮助。
谢谢。将参考名称从
content
更改为product.info
。当您将其添加到内容节点(这是一个核心/text\u列表
块)时,它将自动将其附加到底部。这就是为什么您需要将它放在product.info
节点中,然后在模板中引用它。选项卡在“modern”主题中可用,因此请从modern主题中检查tabs.phtml文件!