0

このカテゴリのカスタム カテゴリ view.phtml があります: http://www.touchfix.nl/onderdelen

サブカテゴリは、次のような親の XML 更新を使用します。

<reference name="catalog_category_default">
<reference name="content">
<remove name="category.products" />
<block type="catalog/category_view" name="alphabase.parts" template="catalog/category/view.parts.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.parts.phtml"></block>
</block>
</reference>
</reference>

<reference name="right">
<remove name="cms_waaromkiezen" />
<block type="cms/block" name="block_speerpunten_onderdelen">
<action method="setBlockId"><block_id>block_speerpunten_onderdelen</block_id></action>
</block>
</reference>

<reference name="head">
<action method="addCss"><stylesheet>css/categoryblocks.css</stylesheet></action>
</reference>

これらのカテゴリの製品にも「right」への変更が適用されるようにしたいと考えています。しかし、これらの変更をカテゴリ設定の製品にも適用すると、「コンテンツ」参照によってページが台無しになり、空白のページが返されます。

「コンテンツ」の更新が製品ビューではなくカテゴリ ビューでのみ行われるように、catalog_category ビューを参照するにはどうすればよいですか?

4

2 に答える 2

0

catalog_category_defaultは参照ではなく、ハンドルです

次のように変更してみましたか?

<catalog_category_default>
于 2012-09-13T11:21:45.147 に答える
0

私は次のようにしてトリックを行うことができました:

<reference name="content">
    <reference name="category.products">
        <action method="setTemplate"><template>catalog/category/view.repair.phtml</template></action>
        <reference name="product_list">
            <action method="setTemplate"><template>catalog/product/list.repair.phtml</template></action>
        </reference>
    </reference>
</reference>

<reference name="right">
    <remove name="cms_waaromkiezen" />
    <block type="cms/block" name="block_speerpunten_reparatie">
        <action method="setBlockId"><block_id>block_speerpunten_reparatie</block_id></action>
    </block>
</reference>

<reference name="head">
    <action method="addCss"><stylesheet>css/categoryblocks.css</stylesheet></action>
</reference>

違いは、ブロックを削除して正しいテンプレートで新しいブロックを追加することではなく、対応するアイテムのテンプレート ファイルを変更することです。製品ビュー ブロックを で参照できるようになりまし<reference name="product.info">た。これが次のステップになります。

于 2012-10-01T18:24:35.510 に答える