Hi!
I have two vocabularies (Animals and Countries, for example). I also have nodes (images or videos). For each node, I have two cck fields, one for each vocabulary. So I add an image of my dog and I associate that node to "UK" and to "Dog".
I set pathauto to generate the URL with the following: [term-raw]-[title-raw]

Initially, I didn't have the Countries vocabulary, so all my generated URL looks great.
Now, some of them take the name of the country, and some others the name of the animal (the term name, you know). I don't want to have this kind of randomly behavior.
In my case, I always want to use the name of the animal, and never the country name. Is there a way to use just the terms from an specific vocabulary??

So, in one line: It is possible to restrict the [term-raw] for one vocabulary??

Thanks! Lot of text, but it's just to explain the problem in detail.

Comments

greggles’s picture

What kind of cck field is this? A selection field? A cck-taxonomy field of some type (if so, which one because there are a lot of "cck taxonomy" modules).

To answer your question, it's not possible now to limit the term tokens to one taxonomy or another.

There is this handbook page which helps explain how the process works - http://drupal.org/node/206912 can you read that and let me know if it helps?

ferrangil’s picture

Exactly what I was explaining.
Well, I'll try to hack the query in order to just fetch terms from vocabulary number 1.
I think it will be a nice option to add the "Limit pathauto to use terms from [X] vocabulary" (and the users can choose the vocabulary or something). Without hacking, in the settings page.
If this works for me, I'll add this feature request to the pathauto issue queue.
Thanks, greggles.

greggles’s picture

Status: Active » Fixed

Note that the handbook page explains how to fix the problem without any hacking required.

There is a feature request to support syntax like [term= vid:1] or something like that but it is waiting on some other things in token.

ferrangil’s picture

I don't have any weight option related with my vocabularies. I never saw a weight in the vocabulary admin page. I'm missing something??
I preffer to do it without hacking the code at all, but I'm pretty sure I'll use just one vocabulary in my case.

greggles’s picture

Go to admin/content/taxonomy and click on "edit vocabulary."

At the bottom of the page is the weight field. If that's missing then someone is wrong/weird with your Drupal core installation.

ferrangil’s picture

It's not there... so I must have some kind of problem... or some module is hiding the weight field. Odd! :(
Thanks. Well, I'll try to change the select to be able to use just one vocabulary.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

ferrangil’s picture

Hierarchical Select module was hiding that weight field! Now it's fixed and it's available!

greggles’s picture

Aha - well that is interesting to know and thanks for following up that you've fixed it.