I am using the below mentioned code to move the Layered navigation above content on Search pages in catalogsearch_result_index.xml

    <move element="catalogsearch.leftnav" destination="content" before="-" />

But it is not showing above content on search pages.

Please help me in correcting the code, if i am missing something in this

  • can you elaborate your code
    – ben
    Jun 27 '18 at 10:52
  • You can try This <move element="catalogsearch.leftnav" destination="header.container" />
    – ben
    Jun 27 '18 at 10:54
  • Not working:( this is the code, i have overwrite this file (/app/design/frontend/Vendor_Theme/base/Magento_CatalogSearch/layout/catalogsearch_result_index.xml ) in my theme for getting this.
    – Vinay
    Jun 27 '18 at 13:27

You need to use <move element="sidebar.main" destination="content" before="-"/> The layered navigation for the search results page is defined in /vendor/magento/module-layered-navigation/view/frontend/layout/catalogsearch_result_index.xml and the referenceContainer is sidebar.main not catalogsearch.leftnav.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.