AddSearch / search-ui

JavaScript library to develop Search UIs for the web
https://www.addsearch.com/
MIT License
24 stars 4 forks source link

how can NUMBER_OF_RESULTS_TEMPLATE be overridden? #53

Closed Lefthandmedia closed 3 years ago

Lefthandmedia commented 3 years ago

the question says it all. How can NUMBER_OF_RESULTS_TEMPLATE that is used in the SEARCHRESULTS_TEMPLATE be overridden? I need this to be able to translate the labels in there according to the language of my page. I tried this:

  searchui.searchResults({
    containerId: 'results-container',
    template: MYCUSTOM_SEARCHRESULTS_TEMPLATE,
    template_resultcount: MYCUSTOM_NUMBER_OF_RESULTS_TEMPLATE,
  });

But that doesn't seem to work. i get a message in the JSON response The partial NumberOfResultsTemplate could not be found And can this template be used outside of SEARCHRESULTS_TEMPLATE as a separate component?

Tnx RDG

Lefthandmedia commented 3 years ago

found it myself