我想在类别页上添加.phtml模板文件只使用xml。
我试过下面的代码,但注意到成功了。
<catalog_category_default>
<reference name="header">
<block type="catalog/category_view" as="catalog_category_banner" name="catalog.category.banner" template="catalog/category/category-header.phtml"/>
</reference>
</catalog_category_default>在header.phtml文件中,下面的代码行。
<?php echo $this->getChildHtml('catalog_category_banner'); ?>提前感谢
发布于 2016-09-03 14:19:41
<default>
<reference name="header">
<block type="catalog/category_view" as="catalog_category_banner" name="catalog.category.banner" template="catalog/category/category-header.phtml"/>
</reference>
</default>
in header.phtml use $this->getChildHtml('catalog_category_banner');https://stackoverflow.com/questions/39290652
复制相似问题