在目录列表上显示magento图层状态(不在侧边栏上)

Kam*_*mal 7 php magento

有没有办法在页面标题下方的内容区域加载过滤层状态在此输入图像描述

我试过几种方法等,包括template/catalog/layer/state.phtmltemplate/catalog/product/list.phtml上增加以下片段<reference name="content">上的catalog.xml

<block type="catalog/layer_view" name="catalog.leftnav" after="leftnav" template="catalog/layer/view.phtml"/>
Run Code Online (Sandbox Code Playgroud)

什么都行不通......我该怎么办?

谢谢之前:)

Md.*_*mun 2

在 page.xml 中搜索<block type="core/text_list" name="content" as="content" translate="label">

将此代码粘贴到此处(缺点:它将加载到每个内容中,最好将其放在目录页面块标记中):

<block type="catalog/layer_state" name="catalog.layer.state" as="catalog.layer.state" template="catalog/layer/state.phtml"/>
Run Code Online (Sandbox Code Playgroud)

现在在catalog/product/list.phtml文件中,您可以通过以下方式获取:

<?php echo $this->getChildHtml('catalog.layer.state') ?>
Run Code Online (Sandbox Code Playgroud)