[development] Drupal 7 - views

Iain Wiseman iwiseman at bibble.co.nz
Sun May 1 07:05:30 UTC 2011


Hi,

Got views to work for my module but cannot figure how to use a field 
which is not in the base table. Using fields which are not in the base 
table cause the views editor to say "missing handler" next to the field.

As an example I have the tables

table NAME
NAME_ID
LAST_NAME
FIRST_NAME

and

table ADDRESS
NAME_ID
ADDRESS_LINE_1
ADDRESS_LINE_2

I want to display both ADDRESS_LINE_1 and LAST_NAME.

I have tried adding the following but get the missing handler error.

   $data['NAME']['LAST_NAME'] = array(
     'title' => t('Last name'),
     'help' => t('Last name.'),
     'field' => array(
       'handler' => 'views_handler_field_string',
       'click sortable' => TRUE,
     ),
     'filter' => array(
       'handler' => 'views_handler_filter_string',
     ),
     'sort' => array(
       'handler' => 'views_handler_sort',
     ),
     'argument' => array(
       'handler' => 'views_handler_argument_string',
     ),
   );




More information about the development mailing list