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
Comments
value of field
You have used 'field' => 'view_name',
The value of field should contain the column name of your database table. Have u done the same ?
Value of field
Yes. i have a field in database view_name which tracks the view name .
using views
i never developed a module
but i think you can make a view using the views and export the view you created to module you wanted.
does it make sense.