What's wrong with my custom node template? I'm attempting to make my first custom node template that is supposed to be used for a certain content type with the machine name of "content_block." I copied the "/modules/node/node.tpl.php" file to my theme's directory at "/sites/all/themes/mytheme." Then I renamed the file to "node--content_block.tpl.php."

Then I cleared the site's cache via "Administration » Configuration » Development » Performance."

It seems to only be partially working. Some of my content type's field variables render, but not with the values I expect. Others don't render anything but the word "Array". 

My template code looks like this:

&lt;div id="node-&lt;?php print $node-&gt;nid; ?&gt;" class="&lt;?php print $classes; ?&gt; clearfix"&lt;?php print $attributes; ?&gt;&gt;
  &lt;?php if ($field_headline == TRUE &amp;&amp; $field_headline != " "): ?&gt;
    &lt;?php print render($title_prefix); ?&gt;
    &lt;?php print $field_headline_level; ?&gt;&lt;?php print $title_attributes; ?&gt;&gt;&lt;?php print $field_headline; ?&gt;&lt;/&lt;?php print $field_headline_level; ?&gt;&gt;
    &lt;?php print render($title_suffix); ?&gt;
  &lt;?php endif; ?&gt;  
  &lt;div class="content"&lt;?php print $content_attributes; ?&gt;&gt;
    &lt;?php print $field_content; ?&gt;
  &lt;/div&gt;
&lt;/div&gt;


One thing I definetly don't understand is when to use print render($variable) and when to use print $variable.
Use print render when the variable is a build array and use
Use print when the variable is a PHP string containing HTML.


For more details, render arrays on d.o. (render and build arrays are the same thing).