I tried to show the search box in a custom front page, which is a regular HTML page.

How can I achieve it?

closed as not a real question by kiamlaluno Nov 17 '12 at 21:23

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Going to need version of Drupal and to see how you are trying to add it (code). Also are you trying to use a custom template file for your homepage, or your homepage isn't in Drupal at all? – kevindeleon Aug 2 '12 at 23:20
  • I think you should read more on how Drupal work, Creating a new blank HTML page is not the right way to create a custom front page. take a look here for starters drupal.org/node/265172 – saadlulu Oct 7 '12 at 9:23

I'm not sure if this is exactly what you're asking, but if you want to output a block directly in code you can use module_invoke().


Drupal 7

$block = module_invoke('block', 'block_view', 'current_search');

Drupal 6

$block = module_invoke('block', 'block', 'view', 'current_search');

Then render the contents of $block.

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