Render fields in a custom bean.tpl.php I have a custom tpl for bean block called: block--bean--image-footer-block.tpl.php, also I have custom tpl for both fields:

field--title-field--footer-block.tpl.php
field--field-block-footer-imagen--footer-block.tpl.php


I don't want to use the default &lt;?php print render($content); ?&gt; 

But If I try to use

&lt;?php print render ($content['field_block_footer_imagen']); ?&gt;


or 

&lt;?php print render ($content['title_field']); ?&gt;


I get this error

Fatal error: Only variables can be passed by reference in 


The beans fields are:

title_field
field_block_footer_imagen


Any idea to print both fields? 

Thanks

Oskar
Note, to avoid getting the 'pass by reference' error, assign the output to a variable before passing it in as an argument to the render() or drupal_render() functions

Partial Solution, without preserving display settings

For reference, I tried:
How do I render a field value including its format?

Which gave me something similar to:

&lt;?php
$banner = field_view_field('bean', $bean, 'field_banner_image')
echo render($banner);
?&gt;


The only problem being that it was ignoring my output display formatting I had set on the block type. You can specify one, but I couldn't find a source readily available with the values of the $display array which would be passed as 4th parameter to field_view_field.

Full solution, preserving display settings

Since I wanted to preserve the setting specified by the configuration of the field, and not rely on display defaults (ie: showing the label above an image) I looked back at the bean.tpl.php. Within the content they were building the $elements array, and using drupal_render. Giving this a shot and it worked:

&lt;?php
$banner = $elements['field_banner_image'];
echo drupal_render($banner);
?&gt;


This also preserved my removal of the field label.

This was all done within my bean--banner.tpl.php which should be a similar setup to what you're facing. Hope this helped!