I have a
Boolean field on a content type. Possible values are
<div class="field field-name-field-status field-type-list-boolean field-label-inline clearfix"> <div class="field-label">Completion status: </div> <div class="field-items"> <div class="field-item even">completed</div> </div> </div>
What's the best way to add such a class on
What I've tried so far:
hook_field_display_alterbut this doesn't provide me with data nor field type
hook_node_viewbut I cannot iterate fields by type. I'd need to pinpoint the specific field instance I need to modify but I don't know that in advance.
- by providing a custom node template, but this solution is not generic for all occurrences of a boolean field