Insert a node field programmatically I have a &lt;div&gt; containing a node (a Basic Page), which has a title, body and a header image. I do not want to display the header image inside that div, so I removed it from the block layout. I would like the header image to be in the html before the &lt;div&gt;, that is, outside of the div into which the given content type is outputted (so I cannot solve this via block layout, since the image field is to be outputted outside of the content block). 

Can I somehow programmatically instruct my theme to display the header image of my Basic Page? Or is there a better way how to do it? 

Example: 
I need to change this:

&lt;div&gt;
&lt;img src="headerimage.jpg"&gt;
&lt;h1&gt;Title&lt;/h1&gt;
&lt;p&gt;body&lt;/b&gt;
&lt;/div&gt;


to this:

&lt;img src="headerimage.jpg"&gt;
&lt;div&gt;
&lt;h1&gt;Title&lt;/h1&gt;
&lt;p&gt;body&lt;/b&gt;
&lt;/div&gt;
You can put php code in a block template and write something like:

$node = node_load($node_id);


and then access the specific field you want to show like:

print $node-&gt;title;
print $node-&gt;field_yourfield["und"][0]["value"]


Edit:

Also, you can modify the node template for the teaser, copying the node.tpl.php file in your subtheme (you can look how to make a subtheme here) and putting the html structure you want inside:

if($teaser)
{
...
}


There are other displays available for nodes other than page and teaser.