[drupal-devel] taxonomy nice URLs

Julian Bond julian_bond at voidstar.com
Wed Mar 23 17:43:57 UTC 2005

Morbus Iff <morbus at disobey.com> Wed, 23 Mar 2005 09:46:26
>> What I've been trying is /taxonomy/vterm/vocab_name/term_name
>> all nodes for term term_name in vocabulary vocab_name using vterm 
>>means  that the old /term/ still works.
>What does "vterm" mean (where "mean" is loosely connotated as "why is 
>this a companion to "term" and why is this the best name for the new 

It doesn't mean anything, it's just an alternative to /term/ to 
highlight that it works differently.

>> taxonomy_get_term_by_name_and_vid($name, $vid)
>"Iffy" on this one. I do/required something similar in
>the patch I'm working on and did the following instead:
>  $possibilities = taxonomy_get_term_by_name($typed_term);
>  foreach ($possibilities as $possibility) {
>    if ($possibility->vid == $vid) {
>    }
>  }

That's a better way to do it.

>> It's then pretty easy to take
>> /taxonomy/vterm/Tags/horse+riding
>Ah, fun, fun. I know what you mean here (a term called "horse riding"), 
>but how does that relate to /taxonomy/term/1+2+3? (in this case, show 
>me all nodes tagged with tid 1, 2, and 3). Would I ever be able to get 
>"horse riding" and "bareback" and "nudity" in a URL, or would that 
>functionality require me to use the non-vterm URLs?

I wonder what flickr and del.icio.us do here. They allow both multi-word 
tags and tag addition in the filter. Since "+" is common url encoding 
for space, using it to mean "as well as" doesn't look right. But that's 
all just convention. How about
/taxonomy/vterm/Tags/horse%20riding+horse. Isn't that going to come 
through php as "horse riding horse" in a single variable?

Julian Bond Email&MSM: julian.bond at voidstar.com
Webmaster:                 http://www.ecademy.com/
Personal WebLog:          http://www.voidstar.com/
M: +44 (0)77 5907 2173      T: +44 (0)192 0412 433
S: callto://julian.bond/

More information about the drupal-devel mailing list