我正在运行Magento 1.9.1.0与RWD主题。当将页面布局设置为2 columns with left bar
时,我可以正确地看到左侧栏中的过滤器(按价格等排序)。我怎么能得到这个工作在1 column
页面布局(仅为类别)?我想在我的产品顶部创建一个全宽版本,使用类似Catalin SEO目录分层导航(用于滑动价格栏等)。
第1列。php模板没有左块,这是层视图块通常注入的地方。在local.xml中做到这一点的一种方法是将块放入内容(或after_body_start或before_body_end,或任何core/text_list子块):
<catalog_category_default>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml">
<block type="core/text_list" name="catalog.leftnav.state.renderers" as="state_renderers" />
</block>
</reference>
</catalog_category_default>
在你的css中,你可以隐藏图层块html,如果你不希望它显示,但仍希望它加载:
.category-mycategory .block-layered-nav {
display: none;
}
mycategory是你的类别名。