The page.tpl.php prints the header image like so. I need to change it so that it prints it as a background image. i.e <div style="background-image:"' . $url . '"></div>
When I make that change the value of $url changes and includes additional text, not just the path to the image as it does in this format. How can I change this?
if ($node->field_header_image && $node->field_header_image['und'][0]['uri']) {
$url = file_create_url($node->field_header_image['und'][0]['uri']);
echo '<img src="' . $url . '" width="100%">';