When submitting content, users are able to select from a number of categories and a number of subtopics(terms.) I'd like to be able to limit the selection of a category to one, instead of letting them choose many at a time.
In combination with the pathauto module, URL aliases are being formed based on the lowest weight category selected, but nodes are still being categorized into all the categories selected by the user when the node was submitted.
Is there a snippet I can insert into the taxonomy module to achieve this functionality?
Comments
Comment #1
Gurpartap Singh commentedEdit your vocabulary and choose not to allow multiple selections. Hopefully, that'll help you. What is your question for pathauto?
Comment #2
David N commentedI've already limited users to choosing one term from each vocabulary, but the problem is, some users are choosing one term from multiple vocabularies/categories when I only want them choosing one overall - whichever term the node can best be categorized as.
To elaborate on the pathauto comment, say a user is selecting term 1 from vocab A, in addition to term 1 from vocab B. The URL alias generated would be something like news/term1/node_title, but the node itself would still show up if one were to visit the page for term 1 from vocab A or term 1 from vocab B. I was just using this to point out why I wanted to limit the selection of terms to one overall.
Comment #3
Gurpartap Singh commentedsorry can't get you well at the pathauto again, but do you mean, you have a node at news/term/title and no term listing on news/term? For the vocabularies thing, you could try having a single vocabulary with multiple terms in hierarchy. like
earth
- human
- animals
-- lion
-- cheetah
- plants
-- rose
etc.
where you can set that user can only select 1 out of them.
Comment #4
ricabrantes commentedClosed, no activity..