function nd_views_node_helper in Node displays 6.2
Same name and namespace in other branches
- 6.3 nd.module \nd_views_node_helper()
Helper function for views node plugin.
3 calls to nd_views_node_helper()
- ds_views_row_apachesolr in ./
nd.module - Render the apachesolr object through the DS views plugin.
- ds_views_row_apachesolr_node in ./
nd.module - Render the apachesolr node object through the DS views plugin.
- ds_views_row_node in ./
nd.module - Render the node object through the DS views plugin.
File
- ./
nd.module, line 356 - Node displays.
Code
function nd_views_node_helper(&$vars, $build_mode) {
$nid = $vars['row']->nid;
if (!is_numeric($nid)) {
return;
}
if (module_exists('object_cache')) {
$node = object_cache_get('node', $nid);
}
else {
$node = node_load($nid);
}
if (empty($node)) {
return;
}
$node->build_mode = $build_mode;
// Check the teaser flag and show_links flag.
$teaser = $node->build_mode != 'full' ? TRUE : FALSE;
$show_links = ds_show_field('nd', $node->type, $build_mode, 'links');
// Build object.
$vars['object'] = node_view($node, $teaser, FALSE, $show_links);
}