Skip to: Site menu | Main content


Additional Search Blocks in Drupal

Ever need to create additional search blocks for your Drupal installation? One use might be so that you can theme or position the block differently depending on which page the block appears on.

It's actually quite easy to do - all you need to do is create a new module that implements "hook_block" and then create a new block and call the "search_box" function (from search.module) to populate the box with the correct form elements. Here's the code:

Submitted by michael on Tue, 08/07/2007 - 5:31pm
Filed under: