0

Magento では、phtml を list.phtml にカスタム モジュールとして表示しようとしています。私のxmlは次のようになります:

<catalog_category_default>
    <reference name="content">
            <block type="my_prevenda/prevendalist" name="prevenda" as="prevenda" template="prevenda/prevenda_list.phtml" />
    </reference>
</catalog_category_default>

そして、私はこのように呼び出します:<?php echo $this->getChildHtml('prevenda') ?>

ただし、このメソッドは view.phtml でしか使用できません。list.phtml に表示するにはどうすればよいですか? 商品名のままです

ありがとうございます!

4

1 に答える 1

1
<?xml version="1.0"?>
<layout>
    <catalog_category_default>
        <reference name="product_list"><!-- need to add to the correct parent block -->
                <block type="my_prevenda/prevendalist"
                       name="prevenda" as="prevenda"
                       template="prevenda/prevenda_list.phtml" />
        </reference>
    </catalog_category_default>
</layout>
于 2012-09-05T22:02:24.303 に答える