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
Comment #1
gregglesWhat 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?
Comment #2
ferrangil commentedExactly 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.
Comment #3
gregglesNote 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.
Comment #4
ferrangil commentedI 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.
Comment #5
gregglesGo 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.
Comment #6
ferrangil commentedIt'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.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
ferrangil commentedHierarchical Select module was hiding that weight field! Now it's fixed and it's available!
Comment #9
gregglesAha - well that is interesting to know and thanks for following up that you've fixed it.