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

zzolo’s picture

First 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

tmcw’s picture

How 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.

zzolo’s picture

Title: Customizable included fields in Views » Document Variable Styling in Views Display plugin
Category: feature » task

Well, 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.

zzolo’s picture

Thanks 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.

zzolo’s picture

Status: Active » Fixed

Handbook page created: http://drupal.org/node/754480
Could use some screenshots, but for another time.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.