Projet

Général

Profil

Paste
Télécharger (1,14 ko) Statistiques
| Branche: | Révision:

root / drupal7 / modules / search / search-block-form.tpl.php @ c7768a53

1
<?php
2

    
3
/**
4
 * @file
5
 * Displays the search form block.
6
 *
7
 * Available variables:
8
 * - $search_form: The complete search form ready for print.
9
 * - $search: Associative array of search elements. Can be used to print each
10
 *   form element separately.
11
 *
12
 * Default elements within $search:
13
 * - $search['search_block_form']: Text input area wrapped in a div.
14
 * - $search['actions']: Rendered form buttons.
15
 * - $search['hidden']: Hidden form elements. Used to validate forms when
16
 *   submitted.
17
 *
18
 * Modules can add to the search form, so it is recommended to check for their
19
 * existence before printing. The default keys will always exist. To check for
20
 * a module-provided field, use code like this:
21
 * @code
22
 *   <?php if (isset($search['extra_field'])): ?>
23
 *     <div class="extra-field">
24
 *       <?php print $search['extra_field']; ?>
25
 *     </div>
26
 *   <?php endif; ?>
27
 * @endcode
28
 *
29
 * @see template_preprocess_search_block_form()
30
 */
31
?>
32
<div class="container-inline">
33
  <?php if (empty($variables['form']['#block']->subject)): ?>
34
    <h2 class="element-invisible"><?php print t('Search form'); ?></h2>
35
  <?php endif; ?>
36
  <?php print $search_form; ?>
37
</div>