| Line 1... |
Line 1... |
| 1 |
<?php
|
1 |
<?php
|
| 2 |
// $Id: search-block-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
|
2 |
// $Id: search-block-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
|
| 3 |
|
3 |
|
| 4 |
/**
|
4 |
/**
|
| 5 |
* @file search-block-form.tpl.php
|
5 |
* @file search-block-form.tpl.php
|
| 6 |
* Default theme implementation for displaying a search form within a block region.
|
6 |
* Default theme implementation for displaying a search form within a block region.
|
| 7 |
*
|
7 |
*
|
| 8 |
* Available variables:
|
8 |
* Available variables:
|
| 9 |
* - $search_form: The complete search form ready for print.
|
9 |
* - $search_form: The complete search form ready for print.
|
| 10 |
* - $search: Array of keyed search elements. Can be used to print each form
|
10 |
* - $search: Array of keyed search elements. Can be used to print each form
|
| 11 |
* element separately.
|
11 |
* element separately.
|
| 12 |
*
|
12 |
*
|
| 13 |
* Default keys within $search:
|
13 |
* Default keys within $search:
|
| 14 |
* - $search['search_block_form']: Text input area wrapped in a div.
|
14 |
* - $search['search_block_form']: Text input area wrapped in a div.
|
| 15 |
* - $search['submit']: Form submit button.
|
15 |
* - $search['submit']: Form submit button.
|
| 16 |
* - $search['hidden']: Hidden form elements. Used to validate forms when submitted.
|
16 |
* - $search['hidden']: Hidden form elements. Used to validate forms when submitted.
|
| 17 |
*
|
17 |
*
|
| 18 |
* Since $search is keyed, a direct print of the form element is possible.
|
18 |
* Since $search is keyed, a direct print of the form element is possible.
|
| 19 |
* Modules can add to the search form so it is recommended to check for their
|
19 |
* Modules can add to the search form so it is recommended to check for their
|
| 20 |
* existance before printing. The default keys will always exist.
|
20 |
* existance before printing. The default keys will always exist.
|
| 21 |
*
|
21 |
*
|
| 22 |
* <?php if (isset($search['extra_field'])): ?>
|
22 |
* <?php if (isset($search['extra_field'])): ?>
|
| 23 |
* <div class="extra-field">
|
23 |
* <div class="extra-field">
|
| 24 |
* <?php print $search['extra_field']; ?>
|
24 |
* <?php print $search['extra_field']; ?>
|
| 25 |
* </div>
|
25 |
* </div>
|
| 26 |
* <?php endif; ?>
|
26 |
* <?php endif; ?>
|
| 27 |
*
|
27 |
*
|
| 28 |
* To check for all available data within $search, use the code below.
|
28 |
* To check for all available data within $search, use the code below.
|
| 29 |
*
|
29 |
*
|
| 30 |
* <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?>
|
30 |
* <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?>
|
| 31 |
*
|
31 |
*
|
| 32 |
* @see template_preprocess_search_block_form()
|
32 |
* @see template_preprocess_search_block_form()
|
| 33 |
*/
|
33 |
*/
|
| 34 |
?>
|
34 |
?>
|
| 35 |
<div class="container-inline">
|
35 |
<div class="container-inline">
|
| 36 |
<?php print $search['search_block_form'] ?>
|
36 |
<?php print $search['search_block_form'] ?>
|
| 37 |
<?php print $search['submit'] ?>
|
37 |
<?php print $search['submit'] ?>
|
| 38 |
<?php print $search['hidden'] ?>
|
38 |
<?php print $search['hidden'] ?>
|
| 39 |
</div>
|
39 |
</div>
|