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.
The Fields component of the View editing UI has long names, especially when fields are implemented via relationships. Wrapping each individual element in spans allows for more targeting theming.
Before:
<a href="/admin/structure/views/nojs/config-item/bestselling_products/default/field/field_product_image" class="views-ajax-link views-ajax-processed-processed">
(Content entity referenced from field_commerce_product) Content: Product Image
</a>
After:
<a href="/admin/structure/views/nojs/config-item/bestselling_products/default/field/field_product_image" class="views-ajax-link views-ajax-processed-processed">
<span class="views-field-entity-type">Content:</span>
<span class="views-field-title">Product Image</span>
<span class="views-field-relationship">Content entity referenced from field_commerce_product</span>
</a>
Comment | File | Size | Author |
---|---|---|---|
#6 | ember-views_ui_field_wrappers-2430573-4.patch | 4.48 KB | Cameron Tod |
#3 | interdiff.txt | 4.82 KB | Cameron Tod |
#3 | ember-views_ui_field_wrappers-2430573-3.patch | 4.19 KB | Cameron Tod |
#1 | ember-views_ui_field_wrappers-2430573-2.patch | 2.95 KB | Cameron Tod |
ember-views_ui_field_wrappers.patch | 3.27 KB | Cameron Tod |
Comments
Comment #1
Cameron Tod CreditAttribution: Cameron Tod commentedCleaned up, should now only add spans when content is present.
Comment #2
Bcwald CreditAttribution: Bcwald commentedWorks good, although the Patch does not affect fields under "Contextual filters" and "Relationships". For consistency, this should apply to these areas as well.
Comment #3
Cameron Tod CreditAttribution: Cameron Tod commentedTouché
Comment #4
Bcwald CreditAttribution: Bcwald commentedpatch in #3 does not work for me.
Comment #5
Bcwald CreditAttribution: Bcwald commentedComment #6
Cameron Tod CreditAttribution: Cameron Tod commentedLet's try again.
Comment #8
Bcwald CreditAttribution: Bcwald commented