diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/search/search-theme-form.tpl.php	Tue Dec 23 14:28:28 2008 +0100
@@ -0,0 +1,38 @@
+<?php
+// $Id: search-theme-form.tpl.php,v 1.1 2007/10/31 18:06:38 dries Exp $
+
+/**
+ * @file search-theme-form.tpl.php
+ * Default theme implementation for displaying a search form directly into the
+ * theme layout. Not to be confused with the search block or the search page.
+ *
+ * Available variables:
+ * - $search_form: The complete search form ready for print.
+ * - $search: Array of keyed search elements. Can be used to print each form
+ *   element separately.
+ *
+ * Default keys within $search:
+ * - $search['search_theme_form']: Text input area wrapped in a div.
+ * - $search['submit']: Form submit button.
+ * - $search['hidden']: Hidden form elements. Used to validate forms when submitted.
+ *
+ * Since $search is keyed, a direct print of the form element is possible.
+ * Modules can add to the search form so it is recommended to check for their
+ * existance before printing. The default keys will always exist.
+ *
+ *   <?php if (isset($search['extra_field'])): ?>
+ *     <div class="extra-field">
+ *       <?php print $search['extra_field']; ?>
+ *     </div>
+ *   <?php endif; ?>
+ *
+ * To check for all available data within $search, use the code below.
+ *
+ *   <?php print '<pre>'. check_plain(print_r($search, 1)) .'</pre>'; ?>
+ *
+ * @see template_preprocess_search_theme_form()
+ */
+?>
+<div id="search" class="container-inline">
+  <?php print $search_form; ?>
+</div>