How to make some taxonomy term gets selected automatically while create a node ?

poseidon123 - July 1, 2008 - 00:23

Ok here is the thing, on my Cars site, I have a 1 Main category called Cars which has 4 sub-categories, Toyota, Honda, Ford, Mclaren and each of these categories has further sub categories of their models.

Now the categories are like this -

/ford
/ford/SX-250
etc.

here SX-250 is the model of ford car. Now when a person wants to create a page on Fords SX-250, he goes to node/add/page and selects the category ford and than sx-250. and than submits the form with other content. My question is, HOW Can I remove this category selection process ?

I mean if the person comes to page www.example.com/ford/sx-250 and than creates the page than how to make that page directly asscociate with that sub-category ? as filling categories is a unnessary part and this is an important feature from usability point of view

Regards

Hi

teyser - July 1, 2008 - 05:24

Hi,
Waht is the use of giving category name car..Just give the category name only as a car company name like fored,toyota and something....

Yor site is related to car only or anyother things...

Thanks,
Raj.

Raj, that was just an

poseidon123 - July 1, 2008 - 11:30

Raj, that was just an example. The real thing is, How to avoid selecting categories altogether and still make sure the new page lands in proper category

possible answer

rdmillner - July 2, 2008 - 13:28

You want created nodes to be assigned to a nested vocabulary term, without the user selecting from a list... If it's a small site you could have an admin assign the node.

What if you created the nested taxonomy for only the first level (cars) then turned on free-tagging for the make and model of the car. On the node-creation page, you could create separate taxonomy autocomplete fields for make and model. This way the user avoids a select list and they aren't filling out fields that they wouldn't normally be filling out to create a node about a car. Having this field autocomplete means that after a few nodes are created (or seeded by you) they can just have their choice automatically filled in. You can probably even set it up so that the field for make uses car as a parent and the field for model uses make as a parent.

hi RD, thanks for showing

poseidon123 - July 2, 2008 - 20:03

hi RD, thanks for showing interest :) I can certainly do this but the idea is to Complete make the user get rid of doing anything with the cateogry selection. If the user is going to www.example.com/car/toyota the page should go to Cars->Toyota term and if he is going to www.example.com/car/toyota/fx50 and than create a page in that section, that page should go to car->toyota->fx50 term.

its alot like yahoo answers where people go to Sports->Baseball category and than ask there question and the question automatically gets started shown in Baseball category.

I'm not really understanding

hansBKK@drupal.org - July 22, 2008 - 03:56

I'm not really understanding your scenario, you might need to clarify your need a bit more with implementation specifics. By "category" I assume you mean a taxonomy term. You then give an example URL path structure - is this from the root of your site? How are you relating these paths to your terms/vocabularies? URLs don't become terms without help from contrib modules, which ones are you already using?

If the user is at the example page you listed, that means (to me) that there is already content there with that tag - is that a view, a node or a term listing page as generated by the core Taxonomy module? How is the user creating a page there?

I'm guessing this would need a custom module to be developed. This project's not currently active, but its code might give you (or your programmers) a starting point: http://drupal.org/project/taxonomy_defaults.

Ok Hans, here is the use

poseidon123 - July 24, 2008 - 19:35

Ok Hans, here is the use case. I am creating a page, /node/add/review which has Title, Body and Category fields.

Category is a drop down with 3 options, Nike, Adidas and Puma. Now I feels its not very usable to make user choose options in drop down, instead it should be like this, if the user click on /node/add/review/Nike than he gets a page with 2 fields, Title and Body, if he goes to /node/add/review/Adidas, he will again get a page with 2 field, title and body and same with puma too, and when the user submit the review after filling title and body, the page will go to either Nike, Adidas or Puma respectively (as per the url he had chosen)

So you see, this is far more user friendly approach.

I think taxonomy_default is the first step in this direction. Hans, can u tell me how to make it like what I want ?

Hi, Why don't you use the

Summit - November 26, 2008 - 15:44

Hi,

Why don't you use the userreview module.
I use it on my site for reviews on trekkings: www.trekking-world.com

greetings,
Martijn

Number Plates

peterson01 - July 10, 2009 - 06:41

Hi,

Nice article.....excellent podcast. any take on the 'taxonomy super select ultra' module?

http://www.carreg.co.uk/

 
 

Drupal is a registered trademark of Dries Buytaert.