Thanks for the module.
I use it for two websites and it works great with views.
Now, i want to implement my custom callback URL for better performance and mixing entity.
Can you have some exemple of implantation with a custom function ? Some documentation ? I have searched here and on your website, but i find nothing about it...
I have create a URL (autocomplete_mylist) with hook_menu and call a custom function (_my_autocomplete).
My custom function returns a json buth there is no filter apply. So, when i fill my input with my text, all the result apears.
I miss something o_0
This is my custom code in a custom module :
function custom_module_menu() {
$items['autocomplete_mylist'] = array(
'page callback' => '_my_autocomplete',
'access arguments' => array('access content'),
'access callback' => TRUE,
'type' => MENU_CALLBACK
);
return $items;
}
function _my_autocomplete() {
$matches = array();
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'taxonomy_term')
->entityCondition('bundle', array('tag'))
->propertyOrderBy('weight');
$result = $query->execute();
$tids = array_keys($result['taxonomy_term']);
foreach ($tids as $key => $tid) {
$term_object = taxonomy_term_load($tid);
$name = $term_object->name;
$matches[]=array("link"=>'/hello',"label"=>$name,"value"=>$name);
}
drupal_json_output($matches);