Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Execute the aforementioned steps for the default template extending.

  2. Edit the template file and add the following script at the bottom of the file.

    Code Block
    languagehtml
    <script>try{window.addEventListener('load',function(){HawksearchVue.getLanguageSuffix=function(){return(s=Object.values(HawksearchVue.storeInstances))&&(cd=HawksearchVue.getClientData)&&s.length&&cd(s[0]).Custom&&cd(s[0]).Custom.language?('_'+cd(s[0]).Custom.language):''}})}catch(e){console.error(e)}</script>
  3. Update all field references to use the language suffix.

    Code Block
    <script id="vue-hawksearch-result-item" type="x-template">
      ...
      <span>{{ result.BestFragments["'itemname"' + HawksearchVue.getLanguageSuffix()] }}</span>
      ...
    </script>

  4. Save, build and reload the site.

...