【问题标题】:Move Category Layered Navigation to bottom of sidebar Magento将类别分层导航移动到侧边栏底部 Magento
【发布时间】:2014-10-30 23:54:44
【问题描述】:

Magento 1.9 rwd 主题 我无法移动类别分层导航。我可以删除它,但我不想删除它。我只是想移动它。无法让它响应“unsetChild”或之前/之后。我已经尝试了我能找到的每一个建议,但没有任何效果。我真正想要的是左侧块中的“常规”类别导航,其下方有分层导航,但分层导航不会让步。这就是我现在拥有的:

<catalog_category_layered>
        <reference name="left">
            <block type="catalog/navigation" name="catalog.leftnav.categories" before="currency" template="catalog/navigation/left.phtml"/>
        </reference>
        <reference name="catalog.leftnav">
            <action method="unsetChild"><child>category_filter</child></action>
        </reference>
	</catalog_category_layered>

我在分层导航上尝试了多种组合。在我的 catalog.xml 中,我已将放置更改为 after="-"。我已将比较侧边栏更改为以前。我在 local.xml 中尝试了以下代码的多种组合

<reference name="left">
    <action method="unsetChild"><alias>catalog.leftnav</alias></action>
</reference>
<reference name="left">
    <action method="insert"><blockName>catalog.leftnav</blockName></action>
</reference>

感谢任何帮助。

【问题讨论】:

    标签: html xml magento block


    【解决方案1】:

    想通了。参考名称需要是

    &lt;reference name="left_first"&gt;

    而不仅仅是

    &lt;reference name="left"&gt;

    代码如下

    <catalog_category_layered>
        <reference name="left_first">
            <block type="catalog/navigation" name="catalog.leftnav.categories" before="-" template="catalog/navigation/left.phtml"/>
        </reference>
    	<reference name="catalog.leftnav">
            <action method="unsetChild"><child>category_filter</child></action>
        </reference>
    </catalog_category_layered>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      • 2020-01-29
      • 2013-10-03
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      相关资源
      最近更新 更多