在类别页面的菜单下方添加横幅
Add Banner Below Menu in Category Page
我需要在面包屑下方添加类别横幅。
我试过添加新的引用
<?php echo $this->getChildHtml('category_banner') ?>
在2列中-left.phtml
在 local.xml
<catalog_category_view>
<reference name="category_banner">
<block type="core/template" name="topbanner" template="catalog/category/category-image.phtml" before="-"></block>
</reference>
</catalog_category_view>
<catalog_category_default translate="label">
<reference name="category_banner">
<block type="core/template" name="banner" template="catalog/category/category-image.phtml"></block>
</reference>
</catalog_category_default>
但是没有输出。
在所有布局中添加了新行,即 2columns-left.phtml 等
<?php echo $this->getChildHtml('category_banner') ?>
在您的 xml
中添加了下面一行
<catalog_category_view>
<reference name="root">
<block type="core/template" name="category_banner" template="catalog/category/category-image.phtml" before="-"></block>
</reference>
</catalog_category_view>
我需要在面包屑下方添加类别横幅。
我试过添加新的引用
<?php echo $this->getChildHtml('category_banner') ?>
在2列中-left.phtml 在 local.xml
<catalog_category_view>
<reference name="category_banner">
<block type="core/template" name="topbanner" template="catalog/category/category-image.phtml" before="-"></block>
</reference>
</catalog_category_view>
<catalog_category_default translate="label">
<reference name="category_banner">
<block type="core/template" name="banner" template="catalog/category/category-image.phtml"></block>
</reference>
</catalog_category_default>
但是没有输出。
在所有布局中添加了新行,即 2columns-left.phtml 等
<?php echo $this->getChildHtml('category_banner') ?>
在您的 xml
中添加了下面一行<catalog_category_view>
<reference name="root">
<block type="core/template" name="category_banner" template="catalog/category/category-image.phtml" before="-"></block>
</reference>
</catalog_category_view>