<move element="catalog.leftnav" destination="category.product.list.additional" before="-"/>
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.
Solved! Go to Solution.
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
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
You are awesome . Adjusting your example to where I needed things to go worked wonders.
@AmagArtwork, you're welcome!
I'm glad that you were able to resolve the problem.
<?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 working
i mean when i click on specific attribute like category or price .it is not showing expected result