/[drupal]/drupal/modules/search/search-result.tpl.php
ViewVC logotype

Contents of /drupal/modules/search/search-result.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Tue Dec 30 16:43:18 2008 UTC (10 months, 3 weeks ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-6, DRUPAL-7-0-UNSTABLE-7, DRUPAL-7-0-UNSTABLE-10, DRUPAL-7-0-UNSTABLE-4, DRUPAL-7-0-UNSTABLE-5, DRUPAL-7-0-UNSTABLE-8, DRUPAL-7-0-UNSTABLE-9, HEAD
Changes since 1.3: +2 -2 lines
File MIME type: text/x-php
- Patch #352470 by scor: fixed typos and grammar in comments.
1 <?php
2 // $Id: search-result.tpl.php,v 1.3 2008/10/13 12:31:42 dries Exp $
3
4 /**
5 * @file
6 * Default theme implementation for displaying a single search result.
7 *
8 * This template renders a single search result and is collected into
9 * search-results.tpl.php. This and the parent template are
10 * dependent to one another sharing the markup for definition lists.
11 *
12 * Available variables:
13 * - $url: URL of the result.
14 * - $title: Title of the result.
15 * - $snippet: A small preview of the result. Does not apply to user searches.
16 * - $info: String of all the meta information ready for print. Does not apply
17 * to user searches.
18 * - $info_split: Contains same data as $info, split into a keyed array.
19 * - $type: The type of search, e.g., "node" or "user".
20 *
21 * Default keys within $info_split:
22 * - $info_split['type']: Node type.
23 * - $info_split['user']: Author of the node linked to users profile. Depends
24 * on permission.
25 * - $info_split['date']: Last update of the node. Short formatted.
26 * - $info_split['comment']: Number of comments output as "% comments", %
27 * being the count. Depends on comment.module.
28 * - $info_split['upload']: Number of attachments output as "% attachments", %
29 * being the count. Depends on upload.module.
30 *
31 * Since $info_split is keyed, a direct print of the item is possible.
32 * This array does not apply to user searches so it is recommended to check
33 * for their existence before printing. The default keys of 'type', 'user' and
34 * 'date' always exist for node searches. Modules may provide other data.
35 *
36 * <?php if (isset($info_split['comment'])) : ?>
37 * <span class="info-comment">
38 * <?php print $info_split['comment']; ?>
39 * </span>
40 * <?php endif; ?>
41 *
42 * To check for all available data within $info_split, use the code below.
43 *
44 * <?php print '<pre>'. check_plain(print_r($info_split, 1)) .'</pre>'; ?>
45 *
46 * @see template_preprocess_search_result()
47 */
48 ?>
49 <dt class="title">
50 <a href="<?php print $url; ?>"><?php print $title; ?></a>
51 </dt>
52 <dd>
53 <?php if ($snippet) : ?>
54 <p class="search-snippet"><?php print $snippet; ?></p>
55 <?php endif; ?>
56 <?php if ($info) : ?>
57 <p class="search-info"><?php print $info; ?></p>
58 <?php endif; ?>
59 </dd>

  ViewVC Help
Powered by ViewVC 1.1.2