I am using the Spotlight module to display categories of search results that don't fit into the paradigm of "declare a function called _spotlight_search_$category() that returns the results for that category" (in particular, I am getting grouped search results from Apache Solr via a single Solr query and want to display each group of results as its own category).
The simplest way for me to do that is to override the spotlight/ajax menu callback with my own function. To do that, it would be helpful if I could avoid repeating lots of code from the Spotlight module.
This patch abstracts out some of that code to a helper function which I can call from my menu callback and thereby get the standard Spotlight results which I can add onto.
(Another way to achieve this goal might be to have the Spotlight module invoke a hook to gather categories from various modules. But I think this patch is a good idea either way, and it's a simpler approach.)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | spotlight-results-output-2360299-1.patch | 675 bytes | David_Rothstein |
Comments
Comment #1
David_Rothstein commentedHere is the patch.
Comment #2
kharbat commented