0

Can anyone help.. i wanted to change the "advanced search" to "finder". How to rename it via xml??

4
  • at which point are you want to show label? Commented Nov 14, 2017 at 11:02
  • I wanted to just change the text from advanced search to finder
    – learner
    Commented Nov 14, 2017 at 11:09
  • At the header near search
    – learner
    Commented Nov 14, 2017 at 11:11
  • I am using ubuntu os.. it runs well on windows.. why not in ubuntu??
    – learner
    Commented Nov 15, 2017 at 6:36

2 Answers 2

1

Put the code in following code in following file.

app/design/frontend/vendor/mytheme/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog-search-advanced-link">
            <arguments>
                    <argument name="label" xsi:type="string">Finder</argument>
                    <argument name="path" xsi:type="string">catalogsearch/advanced</argument>
             </arguments>
        </referenceBlock>       
    </body>
</page>
4
  • 1
    you need to add path catalogsearch/advanced instead of catalogsearch/finder Commented Nov 14, 2017 at 11:18
  • 1
    Updated catalogsearch/advanced. Commented Nov 14, 2017 at 11:45
  • Its not working! !can u help me out
    – learner
    Commented Nov 15, 2017 at 6:04
  • It should work. Because it is tested code. It may be, these links are managing from static blocks Commented Nov 15, 2017 at 7:16
0

Just create en_US.csv(I am assuming you have this locale if you have another then replace with another) file in below path

app/design/frontend/{Vendor}/{theme name}/i18n/en_US.csv

"Advanced Search","Finder"

And then execute below command,

php bin/magento s:s:d
php bin/magento c:f
1
  • I tried but its not changing.. will there be any file permission issues?
    – learner
    Commented Nov 15, 2017 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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