I have a field collection called field-list and inside that collection I have a field called field_extratext.
So I created a tpl file field--field-extratext--field-list.tpl.php and inside that file I have print render($content); .
This works fine and the value gets printed, but if I change the contents of field--field-extratext--field-list.tpl.php to
<span><?php print render($content); ?></span>
it renders nothing!
This
<?php print '<span>' .render($content). '</span>'; ?>
renders nothing.
<span>TEST</span>
renders just fine.
Comments
Comment #1
jisuo commentedAnyone else have this?
Comment #1.0
jisuo commentedadded more examples
Comment #2
jmuzz commented$content is NULL . Try $items. It does seem strange that it would have different behavior compared to the template file not existing at all. This may be related: #1157794: Move markup to template files and improve theming in new 2.x branch
Comment #3
jmuzz commented