Version 1.1.2.1 (checked in on 2008/08/28 at 08:21:44 by dries)
search-result.tpl.php Default theme implementation for displaying a single search result.
This template renders a single search result and is collected into search-results.tpl.php. This and the parent template are dependent to one another sharing the markup for definition lists.
Available variables:
Default keys within $info_split:
Since $info_split is keyed, a direct print of the item is possible. This array does not apply to user searches so it is recommended to check for their existance before printing. The default keys of 'type', 'user' and 'date' always exist for node searches. Modules may provide other data.
<?php if (isset($info_split['comment'])) : ?> <span class="info-comment"> <?php print $info_split['comment']; ?> </span> <?php endif; ?>
To check for all available data within $info_split, use the code below.
<?php print '<pre>'. check_plain(print_r($info_split, 1)) .'</pre>'; ?>
template_preprocess_search_result()
Kommentare
Kommentar hinzufügen