Magento分层导航块.移到中心 [英] Magento Layered Navigation block. Move to center
问题描述
在category.xml
中,我正在以下位置更改引用名称:
In category.xml
I'm changing the reference name in:
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
</reference>
我假设
到content
会将分层的nav
放置在中心.但是,它仍然停留在左侧.实际上,即使我将left
更改为right
,它仍然不会从左侧边栏中移动.
To content
which I assumed would place the layered nav
into the center. However, it still stays on the left. In fact, even I changed left
to right
, and it still doesn't move from the left sidebar.
我在做什么错了?
推荐答案
我设法通过注释掉或删除catelog.xml
中的以下调用来解决此问题(针对遇到此问题的其他人):
I managed to fix this (for anyone else who encounters this problem) by commenting out or deleting the below call in catelog.xml
:
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
</reference>
然后在下面的name="product_list"
块中添加此行.
Then adding this line within the name="product_list"
block just below.
<block type="catalog/layer_view" name="filter" template="catalog/layer/view.phtml"/>
然后在list.phtml
中将其回显为:<?php echo $this->getChildHtml('filter');?>
Then within list.phtml
echo it like: <?php echo $this->getChildHtml('filter');?>
这篇关于Magento分层导航块.移到中心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!