Drupal 7 node reference field formatter for nid I'm working in Drupal 7 and using the reference module to attach an node reference to another node. I'm then using views to show some of that nodes fields. When I display the field for the node reference, I'm give the choice of formatting it as a title, title with link, or rendering out the whole node. All I really want to be able to do is render out the nid or the node rather than the title. There were a number of modules that did this in Drupal 6, anyone know how to do it in Drupal 7?

Thanks
having trouble creating the patch, here is what I did, added 

'node_reference_nid' =&gt; array(
  'label'       =&gt; t('Nid'),
  'description' =&gt; t('Display the nid of the referenced node.'),
  'field types' =&gt; array('node_reference'),
),


to the node_reference_field_formatter_info() function also added

  case 'node_reference_nid':
  foreach ($items as $delta =&gt; $item) {
    if ($item['access']) {
      $node = $item['node'];
      $result[$delta] = array(
          '#markup' =&gt; check_plain($node-&gt;nid),
       );
      if (!$node-&gt;status) {
        $result[$delta]['#prefix'] = '&lt;span class="node-unpublished"&gt;';
        $result[$delta]['#suffix'] = '&lt;/span&gt;';
      }
    }
  }
  break;


to the node_reference_field_formatter_view() function

that's it, hope it helps