A better way to select taxonomy terms
When building a business directory that will have non-admins adding entries and selecting categories, you need to make it as easy as possible. By default, Drupal offers up a multi select box to scroll through possibly hundreds of terms and control-click the categories you want your entry to be in. Definitely not user friendly.
When I was building the directory, I spent some time looking at the various taxonomy modules to find something to simplify choosing categories. There was nothing that really did what I wanted, though, and my javascript skills are non-existant so making my own was out of the question. The best one I found was taxonomy super select, which is a nice module, and does simplify it, but was still bulky and awkward with the number of terms I have.
Then along came Hierarchical Select which was tantalizingly close but lacked one requirement: multi select. I really need people to be able to put their entries in multiple categories. So again I was stuck. Fortunately, that has changed. As of version 2 beta 1, Hierarchical Select now lets you select multiple categories in a simple, easy to use, UI! Interested? You can see it in action by adding an entry to my La Crosse area directory. Please don't actually save the node as this is the live site. My dev site needs to be updated with the latest so I can't use that. You don't actually need to save the node to see it work, though, so check it out.
Thanks to Wim Leers for his work on this much needed module.
Site contents are licensed under a
Thanks for the suggestion of this module, which can be useful elsewhere.
Just wanted to warn you that the combination of the site theme + the module JS is broken in Opera 9.25: level 1 is ok, level 2 appears normally, but once you validate a choice, it climbs up to the same position as level 1, and level 3 appears at that position too.
It seems Opera is the only browser I've tested with that can't handle the CSS. I've tested in Firefox 2, Safari 2, Safari 3 and Internet Explorer 6. Since Opera has such a minor market share, I'm not going to put any work into this (and because I'm no CSS wizard). I've created an issue for this.
That is a really good directory implementation, love it. What is the top level page? Is it a View, custom code or something else?
Perhaps one possible improvement would be to not display categories with 0 entries, but I could also see cases where that acts as a guidance to add something...
And the "Hierarchical Select" module is fantastic...thanks Wim Leers.
Oh well...should have looked a bit closer earlier. You've already started a write-up...
http://shellmultimedia.com/tutorials/building-area-directory
That's got enough pointers.
Are you available for freelance work?
Thanks for the compliment, Nicholas.
And you can ask her more directly about freelance availability via her contact form.
Sorry, Nicholas. I missed this until Wim pointed it out. I'm actually pretty swamped right now so I can't take anything on. Thanks for the interest, though.
Michelle
So i love the Hierarchical Select module and it answers a lot of my needs but... i cant get the results onto the page i have put the following code:-
case 10:array_push($worked, l($item->name, "taxonomy/term/" . $item->tid));
break;
}
into my template and then echoed it out like this:-
<?php print implode("<br /> ", $worked);?>this didn't work despite the fact i followed the same model as for my other Categories... any ideas gang?
Please use the issue queue for support requests on hierarchical select. I have no idea if Wim is continuing to read this blog post.
Michelle
I think i mentioned in another post i am dyslexic... having asked Wim my question on displaying the selected multiple choices from the category (see http://drupal.org/node/211047 ) i am non the wiser. can someone help me out here?
I think i mentioned in another post i am dyslexic... having asked Wim my question on displaying the selected multiple choices from the category i realized i had boobed.
i had ommited to add the line $location = array();
// Split the taxonomy up into one variable per vocabulary$communities = array();
$hobbies = array();
$reading = array();
$music = array();
$video = array();
$location = array();
foreach ((array)$node->taxonomy as $item) {
switch ($item->vid) {
case 1:
array_push($communities, l($item->name, "taxonomy/term/" . $item->tid));
break;
case 2:
array_push($hobbies, l($item->name, "taxonomy/term/" . $item->tid));
break;
case 3:
array_push($reading, l($item->name, "taxonomy/term/" . $item->tid));
break;
case 4:
array_push($music, l($item->name, "taxonomy/term/" . $item->tid));
break;
case 5:
array_push($video, l($item->name, "taxonomy/term/" . $item->tid));
break;
case 10:
array_push($location, l($item->name, "taxonomy/term/" . $item->tid));
break;
}
}
Wim, Michelle, my apologies!
Just to show you all what i did here... On my little corner of the web. here is a quick break down for users and if you have a look at the link to My Profile you'll see the prossess in action
PLEASE don't open an account to try it out tho, the site is live!
many thanks
TIm (mouse77e)
Okay, all that went over my head. Would you recommend any books for Drupal noobs? Our site is using Drupal 5 and it was such a huge improvement over the old site. There are some things I like to with the feeds (like add them to a static page, via a "latest news" block) but I'm definitely not a programmer. Found you through the Drupal forum.
All the Drupal books are listed here. The only one I have is PDD, but that's for programmers.
Michelle
For a very long time many users visiting pressreleasepoint.com are complaining about confusion in selecting countries, states and cities while submitting press release to our website. Since this is a free press release website, we did not have enough budget to improve the category select module. I also do not not know JQuery to code a better UI. Now I found out this fantastic hierarchy select module. Thanks a ton to Wim Leers.