I have a custom image field associated with a "group" entity(Created by the Group Module) that is called field_header_image. Im looking to output the image uri as background style in the page.tpl.php template. To achieve a "Full Screen" effect, I need to get to the outside of the div containers which puts me into page.tpl.php. I simply need to print the url or uri for the image called field_header_image.
I used to use something like this but since Groups are not nodes, Im wondering how to access these fields?? the code below was in my old theme template using Organic Groups so the header image was a field in a node. easy to access!
<?php print file_create_url($node->field_header_image[LANGUAGE_NONE]['uri']); ?>
But that code throws an error now. Id like to be able to insert a similar php statement into my page.tpl.php template that references the entity_type of 'group' instead of 'node'. From the devel module output in Krumo, I can see that the object is located here:
I wish I could figure out how to turn that into a php statement but the problem with that output from Krumo is I need it to work for any group page and pull that pages content, it looks like this location would pull that specific groups header image(group 1)