I have a content type with an entity reference field to select a user. Now I would like to render this field in the node template so that the field links to the user profile. I set the format of the field to "Label" in Manage Display and clicked on the gear so the label is linked to the reference entity.
But because I am printing the field programmatically it doesn't seem to work.
Here's what I do in my node template:
$field_user = field_get_items('field_collection_item', $item, 'field_user');
$field_user_output = field_view_value('field_collection_item', $item, 'field_user', $field_user[0]);
print render($field_user_output);
Does anyone know how to do this?