How to access from node template a field added by module I have a content type that has a custom template. My content type is article and I have a node--article.tpl.php that displays the following.

&lt;?php 
    print render($content['field_image']);
    print render($content['body']); 
?&gt;


I have a module that adds a featured image to each node if it is made a featured node in its options. I believe this is the code in the module that is causing it but I'm not positive.

function featured_nodes_field_extra_fields() {
  $extra = array();
  // Get feature types from the database.
  $featured_node_types = db_select('featured_nodes_types', 't')
    -&gt;fields('t')
    -&gt;execute()
    -&gt;fetchAllAssoc('machine_name'); 

  foreach($featured_node_types as $type =&gt; $feature) {
    foreach (node_type_get_names() as $name =&gt; $value) {
      $extra['node'][$name] = array(
        'display' =&gt; array(
          'featured_nodes_' . $type =&gt; array(
            'label' =&gt; $feature-&gt;label . ' - featured image',
            'description' =&gt; t('If this node is featured, display the associated image.'),
            'weight' =&gt; -10,
          )
        ),
      );
    }
  }
  return $extra;
}

function featured_nodes_node_view($node, $view_mode, $langcode) {
  if (!empty($node-&gt;featured_node)) {
    foreach ($node-&gt;featured_node as $delta =&gt; $values) {
      $node-&gt;content['featured_nodes_' . $values['feature_type']] = array(
        '#theme' =&gt; 'featured_node_image',
        '#node' =&gt; $node,
        '#view_mode' =&gt; $view_mode,
        '#db_values' =&gt; $values,
      );
    }
  }
}


Despite my attempts I have not been able to print the featured image from node--article.tpl.php but I believe I got close. When I added

print render($featured_node[0]['image']);


It displayed 10080. And a unique number on each featured node. Possibly the field's id. But I was still unable to produce the image. Any ideas?
I managed to figure it out. I found a location in the module with this code.

function theme_featured_node_image($variables) {
  $fid = $variables['element']['#db_values']['image'];
  $file = file_load($fid);
  $url = file_create_url($file-&gt;uri);
  return theme('image', array('attributes' =&gt; array(), 'path' =&gt; $url));
}


Then I wrote

$file = file_load($featured_node[0]['image']);
$url = file_create_url($file-&gt;uri);
print '&lt;img src="'.$url.'"&gt;';


Which allowed me to print the image.