How do you expose your legacy database tables to views in drupal 6 Part 2
Continuing from Part 1 of the post where we defined custom data table to make drupal aware of our legacy data, we also want to define custom filters that can be used by the views system to define conditional views. in the hook_views_data() or our example code in part one, the candidate_views_data() function you can see that a field was defined as below: $data [ 'candidate' ][ 'candidate_gender' ] = array ( 'title' => t( 'Gender' ), 'field' => array ( 'click sortable' => TRUE , ), 'filter' => array ( 'handler' => 'candidate_handler_filter_gender' , ), ); notice the filter key in the $data array, we want custom data to appear here, for example 'Male' and 'Female', so we have defined a custom handl...