Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By kvasir-1 on
Hi every body
I'm french so sorry for my english.
I have a problem with hook_views_data.
I want to display in a view the title of the nid countain in the field of a table who I created and I don't know how make to display this title I arrive only to diplay his nid.
I have this code for the moment :
function courses_views_data()
{
$data['ma_table_ref']['table']['group'] = t('Mon nom');
$data['ma_table_ref']['table']['join'] = array(
'node' => array(
'left_field' => 'nid',
'field' => 'nid',
),
);
//This is here I want to display the title and not the nid
$data['ma_table_ref']['nid_du_champ_ref'] = array(
'title' => t('Fournisseur'),
'help' => t(utf8_encode('Fournisseur du produit.')),
'field' => array(
'handler' => 'views_handler_field',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
return $data;
}
I need some helps pleazzzzzzzzzzz
Thanks