cancel
Showing results for 
Search instead for 
Did you mean: 

How to move layered navigation below category discription block on sidebar.

SOLVED

How to move layered navigation below category discription block on sidebar.

I want to move the layered navigation block (filter results block) below my category description on my sidebar. Nothing I'm doing seems to be working, so I must be missing something.

 

Here's what I have in catalog_category_view.xml

<referenceContainer name="sidebar.main">
  <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml"/>
  <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml" before="-" />
  <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" after="category.cms" template="layer/view.phtml">
    <block class="Magento\LayeredNavigation\Block\Navigation\State" name="catalog.navigation.state" as="state" />
    <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
  </block>
</referenceContainer>

I don't see anywhere else that needs updated to make this change. Any and all help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to move layered navigation below category discription block on sidebar.

Hi @AmagArtwork,

 


Have you tried the "<move>" tag? Here is an example:

 

<move element="catalog.leftnav" destination="category.product.list.additional" before="-"/>

 

 

 

Best regards.

Gabriel

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

View solution in original post

5 REPLIES 5

Re: How to move layered navigation below category discription block on sidebar.

Hi @AmagArtwork,

 


Have you tried the "<move>" tag? Here is an example:

 

<move element="catalog.leftnav" destination="category.product.list.additional" before="-"/>

 

 

 

Best regards.

Gabriel

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

Re: How to move layered navigation below category discription block on sidebar.

You are awesome Cat Happy. Adjusting your example to where I needed things to go worked wonders.

Re: How to move layered navigation below category discription block on sidebar.

@AmagArtwork, you're welcome!

I'm glad that you were able to resolve the problem.

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

Re: How to move layered navigation below category discription block on sidebar.

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
		<referenceContainer name="sidebar.main">
		  <block class="Magento\Catalog\Block\Category\View" name="category.cms" template="Magento_Catalog::category/cms.phtml"/>
		  <block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml" before="-" />
		  <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" after="category.cms" template="layer/view.phtml">
		  <block class="Magento\LayeredNavigation\Block\Navigation\State" name="catalog.navigation.state" as="state" />
		  <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
		  </block>
</referenceContainer>
<move element="catalog.leftnav" destination="category.product.list.additional" before="-"/>
	</body>
</page>

i wrote the same code in file C:\wamp64\www\mag_215\app\code\Emizentech\ShopByBrand\view\frontend\layout\catlog_catagory_view.xml but its not working .it shows filters and all the atrributes .also search process is not workingCapture.PNG

Re: How to move layered navigation below category discription block on sidebar.

i mean when i click on specific attribute like category or price .it is not showing expected result