tag combinations similarly to "term/1,2" and "term/1+2" don't work with pathauto?
public
group: Paths
vkha - Sun, 2008-06-15 17:08
Hi all,
if this issue is correctly understood, then tag combination is not available?
Is there any chance to get operators "+" and "," working under pathauto like they do in plain taxonomy module?
thanks!


I'm pretty sure you could
I'm pretty sure you could add them manually as path aliases for different combinations. Having them added automatically seems like a recipe for disaster to me though. However, I've got a feeling that views 2 will allow for something similar to this without the many, many path aliases that would be required otherwise.
hm, but why disaster? it
hm, but why disaster? it works for the "plain" taxonomy module, so I thought why it shouldn't for the pathauto?..
Plain taxonomy module does
Plain taxonomy module does 1+2 etc. via url arguments. pathauto aliases url arguments to arbitrary urls.
So if I hav+e 3 terms.
currently handled by pathauto aliases:
taxonomy/term/1
taxonomy/term/2
taxonomy/term/3
combinations you'd have to add to duplicate core taxonomy module functionality:
taxonomy/term/1,2
taxonomy/term/1,2,3
taxonomy/term/1,3
taxonomy/term/2,3
taxonomy/term/1+2
taxonomy/term/1+2+3
taxonomy/term/1+3
taxonomy/term/2+3
Now multiply those combinations by 2-3,000 (not that much for a freetagging vocabulary).
"combinations you'd have to
"combinations you'd have to add to duplicate core taxonomy module functionality:"
why necessarily add? I thought of simple solution:
Similarly to taxonomy's approach regular expression takes the URL extracts the arguments of the operators "+" and "," on fly (or even a usual "split" function can be used).
extracted arguments are resolved into the term IDs with taxonomy_get_term_by_name (it provides even the terms themselves not just IDs)
Term IDs are passed to the same taxonomy (not pathauto!) engine that generates the result for the strings like "taxonomy/term/1+2+3". Namely to taxonomy_select_nodes. If we'd like to avoid 2nd time db querying than we might use the term array from step 2.
That's all.
Why not?
great - simple
Great, I'm looking forward to the patch.
--
Open Prediction Markets | Drupal Dashboard
patch? great joke :)
i've written NO code in PHP yet -- so, no idea how much sarcasm in your reply :)
http://dooblet.com -- find alternatives. alternatives to anything.
incorrect mental model of how path aliases work
well, your idea of how to solve this is based on a bad "mental model" of how the path alias system works. That's why I said that I was looking forward to the patch - you said it was simple, right ;) In fact it is not simple. :(
As catch has pointed out below, there is a solution to this but, frankly, it's way more work than I'm interested in doing and has little to do with the way that Pathauto currently works...
--
Open Prediction Markets | Drupal Dashboard
What are you actually trying
What are you actually trying to do?
For taxonomy/term/1+2 to category/1+2 you ought to be able to use http://api.drupal.org/api/function/custom_url_rewrite/5