Back to SiteSearch Support

paulgrafx
paulgrafx

I am trying to add 2 versions of the 'searchinput' component on the same page - 1 for desktop and 1 for mobile. I have given them 2 different names and duped the default.htm etc for each in my themes/partials folder.

They both search and produce results but the second instance ignores any of the settings such as 'autoCompleteResultCount' and instead uses the components default settings. Is there a way to get around this?

[searchInput searchInputDesktop]
useAutoComplete = 1
autoCompleteResultCount = 3
showProviderBadge = 1
searchPage = "pages/search.htm"

[searchInput searchInputMobile]
useAutoComplete = 1
autoCompleteResultCount = 3
showProviderBadge = 1
searchPage = "pages/search.htm"
{% component 'searchInputDesktop' %}
{% component 'searchInputMobile' %}
OFFLINE
OFFLINE

Thank you for pointing this out!

In your default.htm partial, make sure to add {{ __SELF__ }}:: before the onType handler.

data-request="{{ __SELF__ }}::onType"

I have released a new version with this fix.

https://github.com/OFFLINE-GmbH/oc-site-search-plugin/commit/0d15e12bc2b499657f77b51521d2dbb1b619ea25

paulgrafx
paulgrafx

Perfect :)

Thanks for all your help OFFLINE.

Last updated

1-3 of 3