This is actually a re-introduction of an argument which was present in older versions of views_service, simply because the data which is returned at the moment by Views 2 is quite a mess:
if the row plugin is set to 'fields' -> results in extra long property names (this is a views 2 module issue), and eg. an imagefield cck data is not complete (no file path), which render this data useless
if the row plugin is set to 'node' -> results in all the nodes data, which is overkill if only eg. the image of a node is needed
Ideal would be that the 'fields' row plugin would return the node struct/object which only contains the fields set in the view (with the proper data, and actual property names), but from a first glance at Views I realize this is quite complex to achieve, even more as there is the possibility to add other fields then type Node/Content (eg. Global/Taxonomy/User…), which would require additional data preparation in the views service module.
In short, re-introducing the fields argument is probably a temporary solution till an ideal solution is available, but at least it is not a loss of a feature which was available before.
(patch in attachment)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_service.fields_arg.6.x.2.2.new_.patch | 2.41 KB | g10 |
| #1 | views_service.fields_arg.6.x.2.2.patch | 2.27 KB | g10 |
Comments
Comment #1
g10 commentedstrange, another patch gone missing…
Comment #3
g10 commentednow relative to the module root…
Comment #4
gddI will refer you to
#329048: Better Views2 Support
#654644: views.get method changed in DEV version
For the discussions that led to the removal of the $fields parameter. This change will not be reverted in 2.x branch, and in future versions the Views service will be removed and left to contrib for implementation.
Comment #5
gddComment #6
autodidactic commentedNevermind, just found my answer in the documentation.