to render a field "view mode" (or "format") inside a node.tpl.php i use, for example:
<?php
print render(field_view_field('node', $node, 'field_myfieldname', array(
'label'=>'hidden',
'type' => 'text_summary_or_trimmed',
'settings'=>array('trim_length' => 30),
)));
?>
now i'd like to do quite the same thing, but inside a field-collection-item.tpl.php (for a field that is part of a field collection).
in my field-collection-item.tpl.php, i can render each field just like in a node;tpl.php:
<?php print render($content['field_myfieldname']); ?>
but if i try the first code above inside field-collection-item.tpl.php (to trim a field-collection field), it just doesn't work...
thanks you for helping !