带有分层导航的CMS页面不起作用 [英] CMS page with layered navigation not working
问题描述
我已经添加了一个CMS页面,该页面通过创建具有带有左侧栏的两列"布局的CMS页面来显示所有产品"类别下列出的所有产品,并且在内容标签中添加了以下代码:
I've added a CMS page wich shows all the products listed under the "All Products" category by creating a CMS page with a "two column with left sidebar" layout, and in the content tabs, I've added the following code:
{{block type="catalog/product_list" category_id="2" template="catalog/product/list.phtml"}}
我正在阅读有关它,分层导航应该已经显示.但是,我将是锚"设置为是",但是它不起作用.我无法让它出现.我在这里想念什么?有没有更好的方法来创建此目录页面?
I was reading about it and the layered navigation should be showing already. However, I've set "Is anchor" to yes, but it doesn't work. I can't make it to appear. What am I missing here? Is there a better way to create this catalog page?
提前谢谢.
推荐答案
请检查以下链接,以了解CMS页中的调用层导航
Please check the below link for calling layer navigation in CMS Page
或者您可以尝试使用设计"标签->页面布局"->布局更新XML":
Or you can try this Design tab->Page Layout->Layout Update XML:
<reference name="left">
<!-- Layered Navigation Block -->
<block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml" >
<action method="setCategoryId"><category_id>40</category_id></action>
</block>
</reference>
<reference name="content">
<block type="catalog/product_list" name="home" template="catalog/product/list.phtml">
<!-- Product List View -->
<action method="setCategoryId"><category_id>40</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</reference>
这篇关于带有分层导航的CMS页面不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!