Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2010 at 20:11 UTC
Updated:
3 Oct 2010 at 10:20 UTC
I need to add a field to an existing View defined by another module. To make upgrades of that module easier, I'd prefer to modify the View using hooks rather than editing it directly through the UI. I understand how to use hook_views_pre_build or hook_views_query_alter to remove fields from a View, but what's the proper way to add fields to a View using hooks?
Comments
Comment #1
dawehnerYou can use $view->add_item for this. Look at existing fields what's the parameters for this.