Fix for Code

  1. function mymodule_views_data() {
  2.   $data = array();
  3.  
  4.   $data['book']['table']['group'] = t('Book');
  5.   $data['book']['table']['join']['node'] = array(
  6.     'left_field' => 'nid',
  7.     'field' => 'nid'
  8.   );
  9.   $data['book']['bid'] = array(
  10.     'field' => array(
  11.       'handler' => 'views_handler_field_numeric'
  12.     ),
  13.     'filter' => array(
  14.       'handler' => 'views_handler_filter_numeric'
  15.     ),
  16.     'sort' => array(
  17.       'handler' => 'views_handler_sort'
  18.     )
  19.   );
  20.   $data['book']['bid']['title'] = t('Book Id');
  21.   $data['book']['bid']['help'] = t(The id of the top level book in this node.');
  22.  return $data;
  23. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.