I would like to show the search form in the header. There is a "Search form" block that can be added if Context is enabled, but it seems to show the /search/node/!keywords page. Is it possible to have it show the /search/site/!keywords page for results?

What controls which of the two included search results pages the form goes to?

Comments

vegardjo’s picture

This is kind of related to my question: #2118489: Add (search) widget to template in code

The Search form block is just the standard Drupal search, while the search widget you can add to a panel is a widget that searches the included Search API view "Database Search". There is no way I am aware of that you can use the first block to search in the latter.

I can think of two solutions:

* Follow the question I have above, and (if there is an answer) impement that directly in your page.tpl.php template file
* Expose a fulltext search filter on the view as a block, then place if with Context / block UI. You should find tutorials on how to do this if you Google it.

lsolesen’s picture

Issue summary: View changes
Status: Active » Fixed

Seems to be an answer here that would do the trick, so closing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yakoub’s picture

Status: Closed (fixed) » Needs work

i believe the correct solution is simply to add search_block_form to $formd_id condition at this line :
http://cgit.drupalcode.org/panopoly_search/tree/panopoly_search.module#n16

what happens is panopoly_search form alter does its work for search_form and not search_block_form .

yakoub’s picture

StatusFileSize
new444 bytes

i know this patch doesn't follow correct format and naming convention .
but it still describes what needs to be done .

dsnopek’s picture

Category: Support request » Bug report
Status: Needs work » Needs review
Issue tags: +sprint

@yakoub: Thanks for the patch!

Sounds like a bug, but I haven't tried to reproduce yet. Marking as "Needs review" because it has a patch, and adding to the sprint board.

dsnopek’s picture

Title: How to setup a sitewide search? » Redirect search block to our search_api-based search
mglaman’s picture

Version: 7.x-1.0-rc5 » 7.x-1.x-dev
StatusFileSize
new1.94 KB

Here is a patch which adds support to the Search Box block provided by core's Search module.

mglaman’s picture

dsnopek’s picture

Here's another build of the same patch (because @mglaman's errored): https://travis-ci.org/panopoly/panopoly/builds/71269173

dsnopek’s picture

Status: Needs review » Needs work

Hrm, also, looking at this patch it appears to also include the changes in #2500307: Update search_api to 1.15 and search_api_solr to 1.8 which should be removed.

dsnopek’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.42 KB

Tests on Travis passed! And worked for me in my manual testing. Here is a reroll of the patch with the changes from #2500307: Update search_api to 1.15 and search_api_solr to 1.8 removed.

  • dsnopek committed 40dd620 on 7.x-1.x
    Update Panopoly Search for Issue #2117715 by dsnopek, yakoub, mglaman:...
dsnopek’s picture

Status: Reviewed & tested by the community » Fixed

Committed this yesterday! Closing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.