Skip to content

how to add sidebar.additional in search page?

I don’t know how to add the sidebar.additional in the search page, can anyone help?

here’s what i tried so far in catalogsearch_result_index.xml :

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
       <attribute name="class" value="page-products"/>
       
        <referenceContainer name="sidebar.additional">
            <block class="MagentoFrameworkViewElementTemplate" name="catalog.compare.sidebar"
                   template="Magento_Catalog::product/compare/sidebar.phtml">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="compareProducts" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_Catalog/js/view/compare-products</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
        
        <move element="sidebar.additional" destination="columns" />

    </body>
</page>

i basically want the same 3-columns layout that is in the category page: sidebar additional, columns with content and then the sidebar.main with the filters. can anyone help? i can only see the main column and the sidebar main…