function template_preprocess_similarterms in Similar By Terms 7
Preprocess for similarterms.tpl.php.
@todo: Needs to be converted to renderable array output.
File
- ./
similarterms.module, line 562 - Similar By Terms module displays a block with similar content based on taxonomy terms.
Code
function template_preprocess_similarterms(&$variables) {
$links = array();
$nodes = $variables['nodes'];
if ($nodes) {
foreach ($nodes as $node) {
if ($variables['display_options'] == 'teaser') {
$teaser = ' - ' . $node->teaser;
}
else {
$teaser = '';
}
$links[] = l($node->title, 'node/' . $node->nid) . $teaser;
}
$variables['items'] = theme('item_list', array(
'items' => $links,
));
}
else {
$variables['items'] = "";
}
}