I use Media + File Entity projects.
I have content type with field_media_picture (widget: Media file selector) which then connected with Media image file.
The Media Image file type has field_picname (text).
I've Managed display for the Media Image file type to display: image file and field_picname.
I've created field--field_media_picture.tpl.php:

<?php print render($items);?>

This code show image + field_picname. It's OK.

But how can I get these fields (image and field_picname) separately in PHP?
I want to theme these fields individually.

1 Answer 1


I've themed these fields through code:

print render($items);
print render($items[0]['field_picname']);

But I'm not sure the code is the best.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.