Field collections templates drupal

In a comment on another post, Joeysantiago pointed out a tpl that provides a workaround for this issue.

In short, you can use field--your-collected-field--your-field-collection.tpl.php. A more complete example with explanation:

If you have a collection called field_collection_foo,
which contains two fields, collected_1 and collected_2,
field--field-collection-foo.tpl.php will theme field_collection_foo, collected_1 and collected_2, overriding any field--collected-1.tpl.php or field--collected-2.tpl.php templates,
but field--collected-1--field-collection-foo.tpl.php and field--collected-2--field-collection-foo.tpl.php will override field--field-collection-foo.tpl.php, allowing for per-field theming again.

Facebook Comments Box