Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml magento将说明块插入1列模板(产品视图)_Xml_Magento_Layout_Block - Fatal编程技术网

Xml magento将说明块插入1列模板(产品视图)

Xml magento将说明块插入1列模板(产品视图),xml,magento,layout,block,Xml,Magento,Layout,Block,我的产品视图当前为setTemplate,如下所示: <catalog_product_view translate="label"> <label>Catalog Product View (Any)</label> <!-- Mage_Catalog --> <reference name="root"> <action method="setTempla

我的产品视图当前为
setTemplate
,如下所示:

<catalog_product_view translate="label">
        <label>Catalog Product View (Any)</label>
        <!-- Mage_Catalog -->
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>........  

目录产品视图(任何)
第/1页column.phtml
........  
我还看到我的描述块在它的子对象中被引用,如下所示

<reference name="content">
<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">

因此,我进入我的1column.phtml,在描述栏中插入以下内容:

<?php echo $this->getChildHtml('description') ?>

但它不会显示在产品页面上


非常感谢您的建议。多谢各位

您正在混合级别。参照设置为1列模板的根,但说明参照的是内容,而不是1列文件

内容在page.xml中定义,其定义为核心/文本列表,这意味着:

在布局中定义时,任何core/text_list类型的块都将 自动渲染其所有子对象

因此,将呈现任何已定义的子级。如果您真的想从单列模板调用描述,请使用以下内容:

echo $this->getChildChildHtml('content','description');