Mercurial > defr > drupal > core
annotate modules/search/search-theme-form.tpl.php @ 1:c1f4ac30525a 6.0
Drupal 6.0
| author | Franck Deroche <webmaster@defr.org> | 
|---|---|
| date | Tue, 23 Dec 2008 14:28:28 +0100 | 
| parents | |
| children | 
| rev | line source | 
|---|---|
| webmaster@1 | 1 <?php | 
| webmaster@1 | 2 // $Id: search-theme-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $ | 
| webmaster@1 | 3 | 
| webmaster@1 | 4 /** | 
| webmaster@1 | 5 * @file search-theme-form.tpl.php | 
| webmaster@1 | 6 * Default theme implementation for displaying a search form directly into the | 
| webmaster@1 | 7 * theme layout. Not to be confused with the search block or the search page. | 
| webmaster@1 | 8 * | 
| webmaster@1 | 9 * Available variables: | 
| webmaster@1 | 10 * - $search_form: The complete search form ready for print. | 
| webmaster@1 | 11 * - $search: Array of keyed search elements. Can be used to print each form | 
| webmaster@1 | 12 * element separately. | 
| webmaster@1 | 13 * | 
| webmaster@1 | 14 * Default keys within $search: | 
| webmaster@1 | 15 * - $search['search_theme_form']: Text input area wrapped in a div. | 
| webmaster@1 | 16 * - $search['submit']: Form submit button. | 
| webmaster@1 | 17 * - $search['hidden']: Hidden form elements. Used to validate forms when submitted. | 
| webmaster@1 | 18 * | 
| webmaster@1 | 19 * Since $search is keyed, a direct print of the form element is possible. | 
| webmaster@1 | 20 * Modules can add to the search form so it is recommended to check for their | 
| webmaster@1 | 21 * existance before printing. The default keys will always exist. | 
| webmaster@1 | 22 * | 
| webmaster@1 | 23 * <?php if (isset($search['extra_field'])): ?> | 
| webmaster@1 | 24 * <div class="extra-field"> | 
| webmaster@1 | 25 * <?php print $search['extra_field']; ?> | 
| webmaster@1 | 26 * </div> | 
| webmaster@1 | 27 * <?php endif; ?> | 
| webmaster@1 | 28 * | 
| webmaster@1 | 29 * To check for all available data within $search, use the code below. | 
| webmaster@1 | 30 * | 
| webmaster@1 | 31 * <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?> | 
| webmaster@1 | 32 * | 
| webmaster@1 | 33 * @see template_preprocess_search_theme_form() | 
| webmaster@1 | 34 */ | 
| webmaster@1 | 35 ?> | 
| webmaster@1 | 36 <div id="search" class="container-inline"> | 
| webmaster@1 | 37 <?php print $search_form; ?> | 
| webmaster@1 | 38 </div> | 
