/[drupal]/contributions/modules/similarterms/similarterms.tpl.php
ViewVC logotype

Contents of /contributions/modules/similarterms/similarterms.tpl.php

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


Revision 1.7 - (show annotations) (download) (as text)
Thu Apr 30 13:29:40 2009 UTC (6 months, 4 weeks ago) by rmiddle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +8 -4 lines
File MIME type: text/x-php
[#449584] by miiimooo cleaner way to display teasers.
1 <?php
2 // $Id: similarterms.tpl.php,v 1.6 2008/07/12 23:18:55 rmiddle Exp $
3
4 /**
5 * @file
6 * simterms.tpl.ph
7 * Theme implementation to display a list of related content.
8 *
9 * Available variables:
10 * - $display_options:
11 * 'title_only' => 'Display titles only',
12 * 'teaser' => 'Display titles and teaser',
13 * - $items: the list.
14 */
15 if ($items) {
16 $items_ls = array();
17 if ($display_options == 'title_only') {
18 foreach ($items as $node) {
19 $items_ls[] = l($node->title, 'node/'. $node->nid);
20 }
21 print theme('item_list', $items_ls);
22 }
23 if ($display_options == 'teaser') {
24 $output = '';
25 foreach ($items as $node) {
26 $output .= '<li>'. l($node->title, 'node/'. $node->nid);
27 $output .= ' - '. $node->teaser;
28 $output .= "</li>\n";
29 }
30 if ($output) {
31 echo "<ul>" . $output . "</ul>";
32 }
33 }
34 }

  ViewVC Help
Powered by ViewVC 1.1.2