My use case is a Panels Everywhere site that needs to have a global search block in the header. Since the site doesn't use regions and blocks, I can't just use search api page and search api block. I have to use an exposed filter on the search api view. Since the exposed filter is expecting to be on the same page as the view, the form path for the exposed filter is wrong.
Perhaps a better solution would be Search Api Panels module that adds search pages to the page manger in Ctools. It could work similar to Search Api Page module, it just would supply the page and block to page manager and panels.
This would be huge for people building pure panels sites, as right now I can't see a way to make this work without without writing a custom module to alter the exposed filter.
There's actually an app in the new Panopoly distro called Panopoly Search, which might be worth investigating, but since it's part of a distro something more generic designed for the Search Api would be awesome.
Comments
Comment #1
alanom commentedThis would be very useful, for search forms in page manager panels as well as panels everywhere and the rest of the ctools / panels family.
This exact feature exists in the Apache Solr drupal module family ( see #1047630: Provide block for custom search pages), it would be good to see it in Search API too
Comment #2
alanom commentedHere's a workaround until panels support is implemented. Note that this is a generic workaround that works in most modules that don't support panels like this, but which can declare block/page combos, (these steps are slightly more complicated than usual due to a bug in the way paths are defined in one of the below modules).
Comment #3
liquidcms commentedI did pretty much the same thing (thanks to alanomaly for the guide) using Search API Views integration to get my views search result into a panel pane. My only issue at the moment seems to be that panels doesn't see the exposed form block so i can't place the form above my search results.
Comment #4
liquidcms commentedthis worked to get the Search API created block added to a panel pane above my views search results:
Comment #5
liquidcms commentedand i guess might need to do this for Facet blocks as well as they don't seem to work in Panels either.
Comment #6
alanom commentedIf you a) are having trouble with search related blocks including Facets in panels, b) you're not using Context views and c) the problem blocks appear before your search results in the panel, this is a longstanding problem. I can't remember where the appropriate issue is, but you can find a step-by-step guide that might fix your problem here: http://drupal.stackexchange.com/questions/8932/search-api-panels-display...
Comment #7
liquidcms commentedsounded promising; but alas, it did not help.
- i added context display to my search api view
- was then able to add this context as a context to my page
- did see context content available (none of which i need) - although i guess i could have used this for the exposed filter instead of my 2 lines of block code
- adding Facet API blocks to content pane and they still do not show.
Comment #8
liquidcms commentedhis solved it for me (sort of): #1392288: Using Facets on Search API Views blocks.. turns out i need to have facet blocks placed in a pane which is rendered "after" the pane with the search results is rendered. for me that meant moving them to a region to the right of the search results rather than the one on the left i was trying to place them in.
so possibly there is a trick here; maybe that was the thing with the context.. although it doesn't work. maybe if i have a duplicate of my search results added before the region on the left where i need to add my facet blocks? and then somehow not render it (which i suspect will break what i am trying to do).
i guess ideally there needs to be a weighting value supported by panels so that you can determine render order
Comment #9
liquidcms commentedwhoo hoo.. ok this actually worked - i simply had to grab any of rht content from the Views Context group and place it "ahead" of where i wanted the facet blocks to go. i simply picked the Views attachment content as it was empty and didnt display anything.
all seems a little cludgy..l but works.. :)
Comment #9.0
liquidcms commentedrun on
Comment #10
legolasboThis issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.