I wanted to sort the result set of nodes returned by nodequeue_api_autocomplete(), so I thought to use hook_query_alter(). Unforuntately, the only query tags available were "node_access" and "i18n_select". The attached patch provides a new tag "nodequeue_autocomplete", so that my implementation of hook_query_alter() can key off that tag.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

krisahil’s picture

Attaching patch.

calebtr’s picture

++ for this patch - I'm not really sure of the politics of adding a tag or not, but this solution is way better than overriding several functions to change the query, or otherwise trying to identify the autocomplete query.