I need a way to add a class to a field collection set.
By this, I mean a single set of field collection fields - not the entire field collection field.
In short, the value of one field within a collection, should set a class on the wrapper element for that field collection set [not the entire field].

It seem the best way to do this is with hook_preprocess_entity, and it's working well.
I get the standard entity markup, with my class in place.

Until fences comes along and blows all those lovely divs away - like it's supposed to.
There is still a wrapping div, but without the class I set.

Any known way to handle this?

Comments

Pere Orga’s picture

Issue summary: View changes

You should be able to create a custom field formatter. I usually do that with entity references fields.

JohnAlbin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.