2

I made a View to list a series of items. Each item has been assigned a Taxonomy term.

My taxonomy terms go like this:

--- Main1
----- Sub1
----- Sub2
--- Main2
----- Sub3
----- Sub4
----- Sub5

So there's a main category and inside other terms.

In my view, you can filter the entries to only display items for a certain category. But the dropdown menu is a mess. It goes like Sub3, Main2, Sub1, Sub5...

So, is there a way to organize it in a way it appears as I listed it above? And also, is it possible to give some kind of indentation for the subterms in the dropdown? (So people can easily tell what is a main term and what's a sub-term).

2 Answers 2

1

You can use Hierarchical Select module to manage taxonomy terms in select list.

See this discussion to implement hierarchical select with Views module : http://drupal.org/node/1170192

0

Check also Better exposed filters - it allows you to display the filter in checkboxes/radios instead of dropdowns (which are horrible for end users) and then you can further style the output to group and divide main categories visually.

Here's a screenshot of something similar I did:

enter image description here

3
  • The "further style" is a feature of that module or did you mean I should edit the code?
    – Saturn
    Commented Sep 22, 2012 at 13:59
  • I did not edit the code if that's what you are asking, I just styled it the way I needed it to be. Commented Sep 23, 2012 at 13:54
  • Checkboxes are cool, but I fear I have dozens of terms, so the list gets too large.
    – Saturn
    Commented Sep 26, 2012 at 20:57

Your Answer

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

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