[development] Re: [infrastructure] Drupal.org should have better URL aliases

Gabor Hojtsy gabor at hojtsy.hu
Tue Dec 27 15:14:30 UTC 2005


> Why not specify that every node / user has a custom path , in the  user
> / node table.
> 
> During initialisation it just means we have to do 2 more small  lookups
> to see if the url has been aliased.
> Creating links we have to make sure to use the $node->path or $user-
>>path property.
> 
> This would cut down on a number of queries for aliases as you almost 
> always have the node object / user object
> when you are busy linking to it
> 
> We'd still need the alias table for anything that aren't these  primary
> objects though.
> 
> You can still provide additional aliases with the alias table, but 
> these won't be used as
> outgoing links over the node/object path.

We use a custom URL aliasing method on Weblabor.hu (Drupal 4.6.x), which
does the path loading for nodes in node_load directly, by joinging on
the url_alias table (this is quite similar to what Adrian suggests, but
leaves the data storage alone in the url_alias table). This largely
reduces the number of paths that you need to load (and we modified the
loading of paths to work similarly to how it is in 4.7, so that only the
non-node aliases are precached).

Goba


More information about the development mailing list