0

This has been giving me troubles for some time now. I am in the process of changing my search results page on my drupal 7 site. I have modified both the search-result and search-results template files to change how my results are displayed on the page.

However I can't figure out how to move the placement of the advanced search form. It is driving me crazy. I have created my own "advanced search" button, and want to give it the dropdown functionality that the default "advanced search" link has.

I know that I can change the "node_form_search_form_alter" function from node.module to alter the guts of this form, but thats not what I want. I just want to place it on the screen somewhere else.

I can't for the life of me figure out how to do this. I have gone through every template file, and the advanced search form just seems to magically appear. Any help would be GREATLY appreciated.

In the image below, you can see the default advanced search link, but I want to move it to my button that I have added, on the right of the page.

enter image description here

1

One option is the Advanced search block module which makes the advanced search form available as a configurable block.

Provides the advanced search form (normally displayed above search results) as a block. The block includes default values for the advanced search fields making it easy to refine searches.

From a brief glance at this module's code, it looks like it hides the default form and re-creates the advanced search form in a block.

  • awesome thanks! Appreciate it. I should have mentioned I was hoping not to use a module but looks like I might have to. – John Paschal Sep 4 '16 at 2:06
  • You're welcome! I understand not wanting to add a module for this. Seems like there should be a simpler theming solution but I couldn't find it... Good luck! :) – Kristin Sep 4 '16 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.