cancel
Showing results for 
Search instead for 
Did you mean: 

advanced search link in search results page

Highlighted

advanced search link in search results page

hi

is there a configuration that places a link for a advanced search in the search result page?

 

thanks

3 REPLIES 3
Highlighted

Re: advanced search link in search results page

Hello @mb_manager 

 

No their is no configuration for that but you can put link using below code to your theme file:
 
  1. Create app/design/frontend/[Theme]/[thememodule]/Magento_AdvancedSearch/layout/catalogsearch_result_index.xml
              <?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="additional">
                <block class="Magento\Framework\View\Element\Template" name="search.result.advance.link" as="searchResultAdvanceLink" template="Magento_AdvancedSearch::advance_link.phtml" />
            </referenceContainer>
        </body>
    </page>
  2. Create  app/design/frontend/[Theme]/[thememodule]/Magento_AdvancedSearch/templates/advance_link.phtml
      <div class="advance_search_link">    
    <a href="<?php echo $this->getUrl('catalogsearch/advanced'); ?>"><span><?php echo __('Advance Search Link');?></span></a>
    </div>

I hope it helps.

Problem solved? Click Kudos and "Accept as Solution"
Highlighted

Re: advanced search link in search results page

Thanks! that's it!

Highlighted

Re: advanced search link in search results page

Hello @mb_manager 

 

Your welcome Smiley Happy

 

If the answer was helpful to you, could you please mark it as a solution so that it would be easy for other community members to find it quickly.

 

Thank you.

Problem solved? Click Kudos and "Accept as Solution"