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.
Before, for non-grouped items in the Display view, all fields were added as attributes to each feature. This is kind of a performance drain. With the following commit, these are now customizable, so the user can choose which fields are attached to the feature (minus the title and description) of course.
The most valuable use of this is with variable styling. I have already tested this out with variable radius and stroke width as well as images from imagefields.
Comments
Comment #1
zzolo CreditAttribution: zzolo commentedFirst draft: http://drupal.org/cvs?commit=338752
This needs more helpful documentation in the interface and maybe a handbook page. Related to: #710908: Support dynamic styles
Comment #2
tmcw CreditAttribution: tmcw commentedHow is this better than checking for all of the fields on the view itself and adding those as attributes? Then the user expectation is that all fields that they choose are attributes and the fields they select as title and body are represented as such. I might be missing something, but it seems like this is building an unnecessary layer on top of views machinery.
Comment #3
zzolo CreditAttribution: zzolo commentedWell, my original thought was that if you want to do some computation you often have to add multiple fields to the view and you would only really want one. But you are right, it just makes sense to just assume the views mechanism instead. I will revert this.
I think then that this ticket should change to adding a "Variable Styles" documentation section to the Views display plugin settings so that people are aware of the options they have for variable styling.
Comment #4
zzolo CreditAttribution: zzolo commentedThanks for setting me straight. I have put back to the way it was, but with some changes:
* Name and Descriptions are not added twice
* attribute ids are the regular field name, not the less friendly alias.
* Added documentation in the plugin settings that lists the attribute syntax to use for each field
http://drupal.org/cvs?commit=339248
I think this should go into a handbook page.
Comment #5
zzolo CreditAttribution: zzolo commentedHandbook page created: http://drupal.org/node/754480
Could use some screenshots, but for another time.