Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi people, i notice that wrappers of fields are always printed, even if it has no value. This cause themeing issues, since div exists.
I know there might be an issue, since if i switch to a second color, this one might have a value while the other does not. But it would be very helpfull to have, at least, an extra class on empty wrapper.....like "empty".
Then it would be solve like -> div.commerce-product-field.empty {display: none;}
thanks for everything.
Comment | File | Size | Author |
---|---|---|---|
#5 | empty-product-field-classes-1570058-5.patch | 3.51 KB | vasike |
#1 | empty-product-field-classes-1570058-1.patch | 4.01 KB | helior |
Comments
Comment #1
helior CreditAttribution: helior commentedThese wrapping divs are always rendered because they are actually necessary for dynamic value replacement – say, when you switch your color attribute. It would be nice however to have some context as to when the product field is empty, as you described for CSS purposes.
Comment #2
FAAREIA CreditAttribution: FAAREIA commentedExcellent helior, it works perfect. Many thanks for this patch and this module =)
Comment #3
vasikehas no success patching.
#1: empty-product-field-classes-1570058-1.patch queued for re-testing.
Comment #4
vasikeactually i tried patching against the dev version
Comment #5
vasikechanged version and recreate the patch. it seems it's working
Comment #6
vasikeComment #7
rszrama CreditAttribution: rszrama commentedTrimmed a little from the patch and committed! Thanks.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/c98eca8