simple autocomplete UI change

grah - May 7, 2008 - 11:04
Project:Teleport
Version:5.x-1.0-beta1
Component:User interface
Category:support request
Priority:normal
Assigned:incidentist
Status:active
Description

I'm an avid qs user and this module is a godsend. I just need a simple UI change for a project. I need to show the pathauto alias in the autocomplete results instead of the internal path of the term.

[Bastia - france/corse/bastia] instead of [Bastia - taxonomy/term/1234]

I only need the change for taxonomy terms; would the function _teleport_matches_taxonomy be the one to modify? I figure I'd simply need to query {url_alias} for the dst value which matches the tid in src.

Is this the way to go here, or am I approaching this from the wrong direction?

#1

incidentist - May 16, 2008 - 00:58
Assigned to:Anonymous» incidentist

You're right, this should definitely be a part of the module. I'm working on it but it's a little tricky. It is easy to display the alias path in the results, but not to search the aliases in a way that obeys the permissions model. For instance, suppose there's a node called "Swiss cheese" with id 1 and alias "sc". I've gotten it such that a search for "swiss" will find the node, and the path will appear as "sc" instead of "node/1". However, if you search for "sc", the node will not come up.

I can't just search {url_alias} because there's no easy way to figure out what kind of stuff the aliases point to. Suppose the user has told Teleport not to return nodes in the search results, or suppose they don't have access to node/7. So the functions that search nodes, taxonomies and so forth will each have to grab the relevant aliases themselves. We'll see how that works.

#2

thomas23@drupal.org - June 3, 2008 - 12:26

bare with me if this idea is completly off-target if you can find the alias shouldn't it then be the same method that menus and other "node access" methods use? Just guessing here as a non-module-developer :)

Btw, great work and thanks for sharing!

 
 

Drupal is a registered trademark of Dries Buytaert.