Needs work
Project:
Fences - Semantic field markup and classes
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2015 at 13:05 UTC
Updated:
21 Sep 2015 at 08:26 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #3
johnalbinThat's definitely going to break things on production sites if we no longer use $classes.
This is the problem we had when we were trying to decide which variables to use. Core has 3 divs each with their own variables:
We couldn't munge all of the classes together into a single div (or proper HTML5 tag) because the legacy classes would not make sense on a single target. In the end, we ignored the content and item variables.
Bug? Yeah, but by design. I'm surprised no one else has complained about it before.
I would accept a patch that merged $attributes with $item_attributes[$delta] and then figured out what to do with the classes in $item_attributes[$delta] (or just stripped the classes since that is what we are essentially doing now.)
Comment #4
johnalbinI took a look at RDF module again (first time in years) and I think I can make it work. It only inserts $item_attributes into the field theme hook. hmm…
Comment #5
johnalbinThis is going to be a backwards-compatible-breaking change.
The problem is that some of the templates do use $item_attributes, the ul and ol templates for example. So some templates need 2 variables, attributes and item_attributes, and some templates need a combined variable… maybe called
$combined_attributes?