My friends ask me how to alter a cck field, a cck widget and cck formatter because he need to alter to make change field made by other module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shellingfox’s picture

FileSize
1.1 KB

Here is my patch. It'll alow CCK field, CCK widget and CCK formatter can alter using:

  • hook_field_info_alter
  • hook_widget_info_alter
  • hook_field_formatter_info_alter
Shellingfox’s picture

Status: Active » Needs review
eric.chenchao’s picture

Subscribe

smokris’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Assigned: Shellingfox » Unassigned
Status: Needs review » Reviewed & tested by the community
FileSize
1.4 KB

+1 for this idea.

In the patch attached to #1, however, the drupal_alter hook gets called repeatedly on the same data (first it gets called on $info which contains module A's data, then on $info which now has data from module A+B, then A+B+C, ...).

I've attached a revised patch, which calls drupal_alter on the data before it gets added to the $info array.

NiklasBr’s picture

Issue summary: View changes

It would be lovely if this patch made it into CCK.