title: How to print the node taxonomy in a block?
body: <p>I'd like to print taxonomy terms (from field <code>field_tags</code>) in a block on a node view page (in a Zen subtheme).</p>
  
  <p>So what I did was.</p>
  
  <p><code>template.php</code></p>
  
  <pre><code>function michal_preprocess_block(&amp;$vars, $hook) {
   if ( arg(0) == 'node' &amp;&amp; is_numeric(arg(1)) ) {
     $node = node_load(arg(1));
     $vars['node'] = $node;
     $vars['node_field_tags'] = $node-&gt;field_tags;
     $vars['node_content_field_tags'] = $node-&gt;content['field_tags'];
   }
  }
  </code></pre>
  
  <p>However, when I try to print it in <code>block.tpl.php</code>, neither of these 2 variables outputs taxonomy terms from the field.</p>
  
  <pre><code>print render($node_content_field_tags);
  print render($node_field_tags);
  </code></pre>
  
  <p><strong>Do You know a Drupal function to render a taxonomy terms field?</strong></p>
  
  <hr>
  
  <p>EDIT 13.01.2011, 00:21</p>
  
  <p>As far as I understood (from <a href="http://api.drupal.org/api/drupal/modules--node--node.module/function/node_view/7" rel="nofollow">this</a>, <a href="http://drupal.org/node/339929#comment-1182561" rel="nofollow">this</a> and <a href="http://drupal.org/node/722294#comment-2638028" rel="nofollow">that</a>) the process the code should look more/less like this</p>
  
  <pre><code> $node = node_load(arg(1));
   $node_view($node) // Generates an array for rendering a node, see http://api.drupal.org/api/drupal/modules--node--node.module/function/node_view/7
   $vars['node'] = $node;
  </code></pre>
  
  <p>and then in the <code>block.tpl.php</code>:</p>
  
  <pre><code>render($node-&gt;content['field_tags']);
  </code></pre>
  
  <p>The $node->content is null, however. </p>
  
  <p><strong>Do You know what I'm missing?</strong></p>