/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /* * Preprocess page.tpl.php to inject the $search_box variable back into D7. */ function MYTHEME_preprocess_page(&$variables){ $search_box = drupal_render(drupal_get_form('search_form')); $variables['search_box'] = $search_box; } ?> Then you just need to print the variable in your page.tpl.php: <?php print $search_box; ?>
Comments
