You are here

function theme_similarterms in Similar By Terms 5

Theme function for similar block

Available variables:

  • $teaser: Display Yes = 0. No = 1
  • $items: the list.

Parameters

array $nodes:

1 theme call to theme_similarterms()
similarterms_block in ./similarterms.module
Implementation of hook_block().

File

./similarterms.module, line 345
Similar By Terms module displays a block with similar content based on taxonomy terms.

Code

function theme_similarterms($display_options, $items) {
  $output = "";
  if (!empty($items)) {
    $output .= "<ul>\n";
    foreach ($items as $item) {
      $output .= '<li>' . l($item->title, 'node/' . $item->nid);
      if ($display_options == 'teaser') {
        $output .= ' - ' . $item->teaser;
      }
      $output .= "</li>\n";
    }
    $output .= "</ul>\n";
  }
  return $output;
}