2015-11-10 25 views
0

Hy, 我正在編寫自定義模塊,我想將自定義塊添加到app/design/frontend/mytemplate/default/template/catalog/product/view/type/default。 PHTML將塊添加到product_type_data

I'cannot使用額外的數據佔位符所以我修改,我已經添加了此代碼default.phtm:

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

在我的模塊layout.xml我寫的以下部分:

<?xml version="1.0"?> <layout version="1.0.0"> 
<catalog_product_view> 
    <reference name="??????"> 
     <block type="core/template" name="msgdisp" as="msgdisp" template="msgdisp/messaggiodisp.phtml"/> 
    </reference> 
</catalog_product_view> 

I'don't找出我已經把替代??????的,到目前爲止,我已經試過:

product_type_data

product.info.simple

但以上沒有一個工作。

在messaggiodisp.phtml我寫了一個簡單的「佔位符」代碼

<!-- Hello World --> 

請讓我知道我做錯了..

回答

0

好吧,我已經找到了解決辦法,我錯在xml文件:

<PRODUCT_TYPE_simple> 
<reference name="product.info.simple"> 
    <block type="core/template" name="msgdisp" as="msgdisp" template="msgdisp/messaggiodisp.phtml"/> 
</reference>