Add one field to hook__views_data()
Posted by prajila.v.p on October 13, 2011 at 7:01am
hiii
i am trying to develop a drupal module which wants a default view. Already there is a group called test which contain 2 fields. i want to add one more field to that group from my module. I tried this code. but it gives an array field and structure broken .
function myhook_views_data() {
$data['test']['table']['group'] = t('test');
$data['test']['table']['base'] = array(
'field' => 'view_name',
'title' => t('test data'),
'help' => t("test data help."),
'weight' => -10,
);
return $data;
}
how can i do this?? Pls help me