function nodereferrer_field_formatter in NodeReferrer 5
Implementation of hook_field_formatter().
File
- ./
nodereferrer.module, line 194 - Defines a field type for backlinking referencing nodes. @todo -clear content cache with nodeapi. -query nids for access on load/view..
Code
function nodereferrer_field_formatter($field, $item, $formatter, $node) {
switch ($formatter) {
case 'plain':
return strip_tags($item['title']);
case 'teaser':
return node_view(node_load($item['nid']), TRUE);
case 'full':
return node_view(node_load($item['nid']));
default:
return l($item['title'], 'node/' . $item['nid']);
}
}