6

I have created a taxonomy vocabulary called Cars makes and models with a structure similar to this:

    -Car Make
    ----Car model
    -----------Year

I want to give the customer, options to sort them in a View , like many cars sites do: a customer choose first the Car make, and automatically models from this make shows in a second level list. But I want also to use this functionality in the (add content )page, so when customer try to sell a car, he will not need to scroll a very large list with makes and models in the same field. I cannot use Hierarchical Select. As many topics in this site suggest, because it doesn’t work for exposed filters in Views, with Drupal 7: http://drupal.org/node/1170192

I have spent hours and days, trying to fix this issue without any success, my options are very limited:

  1. Turn back to Drupal 6, Just to use HS with Views exposed filters. (not a brilliant idea)
  2. Use other CMS like Joomla, in fact there is many Joomla plugins offering this functionality: http://extensions.joomla.org/extensions/vertical-markets/vehicles , but then I will lose all the power of Drupal taxonomy.

  3. Add autocomplete functionality to the views filter and Use Autocomplete term widget , in the (create content page) , but this is not very user-friendly method for no experimented users. More, Autocomplete term widget will allow the creation of new terms, and I do not want users to accidentally create new terms when they enter an incorrect model or make in the field. Maybe I can correct this using Content Taxonomy module(http://drupal.org/project/content_taxonomy), which can deny the creation of new terms. But this is not a global solution to my problem.

Is there a module or any JavaScript or PHP snippet to fix this ?

3 Answers 3

3

Response is late but I think(/hope) accurate. You can use the "Simple hierarchical select" http://drupal.org/project/shs. With the help of this module you can make use of the hierarchical select functionality both through views->exposed filters and of course when adding content.

The widget is available in node forms and as Views exposed filter.

2

I've got a similar situation. What I currently do isn't perfect (it'd be better if it was the same on the admin side as the public-facing side) but it works:

I'm not a big fan of the javascript tree library they suggest in that Better Exposed Filters issue, it takes a bit of modifying to get satisfying results, but it does work.

If you've got the time, I'd try a few different tree libraries to use with Better Exposed Filters, or, trying to make the one bundled with Term Reference Tree work with it. If you get something working really satisfyingly well on the front end, I'm sure a comment here would be appreciated :)

-2

Use Hierarchical Select module.

1
  • 2
    The guy said, "I cannot use Hierarchical Select. As many topics in this site suggest, because it doesn’t work for exposed filters in Views, with Drupal 7: drupal.org/node/1170192" Aug 11, 2012 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.