- Issue created by @tonytheferg
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks for posting this suggestion.
However, it seems using Views for this purpose would be an incredible overkill. We’d either have to create a temporary table with the suggestions for every autocomplete request or write a completely new Views query plugin to support this. In the latter case, getting filters or sorts to work would require even more effort.
Currently, we also just render individual rows and pass them back to the client in a JSON array, so it would be tricky to make this work with a view and probably lose the view’s surrounding markup.All in all, I think you’ll have to create your own module for this. You can use
hook_search_api_autocomplete_suggestions_alter()
to implement this functionality, I think. Just usesetRender()
to set the HTML you want to display for each suggestion.
If you publish the module and it has enough users, we can consider integrating it as an option into this module after all. Thanks!
On an unrelated note, has anyone requested a "view all results" link setting for UI? As some might not think to submit the form to land on the search page.- 🇦🇹Austria drunken monkey Vienna, Austria
I don’t think so, no, but does sound like a good idea.
Maybe look through the existing open issues first but then feel free to create a new feature request for it. Thanks! Automatically closed - issue fixed for 2 weeks with no activity.