Hi.
Is there a way to have a term for a taxonomy vocabulary and a url alias created at the same time?

So I could add 'projects' to the vocab 'menu' and have it create the url alias 'menu/projects' ?
It would be really usefull, I'm not afraid of diving into some code, and it has to be postgres based...

Any help would be appreciated.

Thanks

Comments

Jaza’s picture

I would also like to be able to do this. I'm just setting up my first drupal site at the moment, and have already set up a hierarchical taxonomy of articles under the parent term 'posts'. At the moment, I have to enter the full path manually for each sub-term, e.g. posts/news/important, posts/deals/archive. It would be great if I just had to enter 'archive' as the term's alias, and it would figure out that it should be 'posts/deals/archive' based on the parent terms.

This could also be extended to nodes. If you type in 'contact_details_updated' as the alias of a new article, it could work out that the full path is posts/news/important/contact_details_updated. This might be a bit tricky if the node is classified under several different taxonomies; but you could just tell it to work out the alias based on the relevant taxonomy with the lightest weight. My drupal install already works out the breadcrumb for a node using the lightest weight taxonomy (forget how it does this - I think taxonomy_context does the grunt work).

I've looked a bit at mass URL aliasing, but I don't think that's the right solution. What's needed is a function to generate aliases based on taxonomy, not just to translate system paths (e.g. node/#), which don't have any taxonomy info in them at all. I might try and write a function to do this myself, when I get round to it.

Jeremy Epstein
www.greenash.net.au (soon to be drupalised)

Jeremy Epstein - GreenAsh