只需在相应的视图文件如:node.views.inc
大约106行,加入类似的以下代码即可:
//新加的
//website
// This definition has more items in it than it needs to as an example.
$data['node']['website'] = array(
'title' => t('Website'), // The item it appears as on the UI,
'help' => t('The website of the node.'), // The help that appears on the UI,
// Information for displaying a title as a field
'field' => array(
'field' => 'website', // the real field. This could be left out since it is the same.
'group' => t('Node'), // The group it appears in on the UI. Could be left out.
'handler' => 'views_handler_field_node',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort',
),
// Information for accepting a title as a filter
'filter' => array(
'handler' => 'views_handler_filter_string',
),
'argument' => array(
'handler' => 'views_handler_argument_string',
),
);