You are here

function template_preprocess_nd_row_node in Node displays 6

Template helper for theme_views_view_row_node

File

theme/theme.inc, line 44
Theming functions for nd.

Code

function template_preprocess_nd_row_node(&$vars) {
  $options = $vars['options'];
  $vars['node'] = '';

  // make sure var is defined.
  $nid = $vars['row']->nid;
  if (!is_numeric($nid)) {
    return;
  }
  $node = node_load($nid);
  $node->build_mode = $options['build_mode'];
  if (empty($node)) {
    return;
  }
  $teaser = $node->build_mode != 'full' ? TRUE : FALSE;
  $vars['node'] = node_view($node, $teaser, FALSE, $options['show_links']);
}