Hi,
I imagine this is simple, but I'm going around in circles with it...
I have a custom content type that uses a vocabulary to tag it with a taxonomy category. eg a 'book' with a simple 'book category'. The vocab is a 'free tagging' type that uses 'Suggested Terms' module to make tagging easier.
I have a view that I want to use to list the books grouped in their respective categories.
eg.
- Foreign editions
- First French Book
- Reprinted Books
- Book End
- Amazonian Tree Frogs
- ...
I cannot seem to get them to group using the category field settings or using the 'Theme Wizard' in the Site Building > Views. I always get the category included for every node.
I have tried using 'CCK Taxonomy fields' and 'Taxonomy fields' but non of them group the fields in the view. The only ay I got it to work was to use a static 'text field' for the category, but then I loose the benefit of the vocab.
PS I tried the 'biblo' module and it was too much for what I need.
Thanks in advance,
Drew
Comments
I think the Taxonomy Lineage
I think the Taxonomy Lineage module might be useful to you: http://drupal.org/project/lineage
There's also some sort of Lineage view in the Views Bonus Pack: http://drupal.org/project/views_bonus
I only tested lineage a little bit a while back, so i'm not sure if it's perfect for your needs though.
Trying Lineage Module
Thanks for the suggestion. I'm trying to get it to display as needed. I'm starting to think I need to code it instead of trying to get views to do the work.
Will let you know when it works. :)
D
Figured it out now
FWIW,
I managed to do this without using Lineage module.
Basically I used views to output a list of required fields, including the taxonomy:term field. Then I used the 'theme wizard' to create a grouped list, selecting the 'term_data_name' field as the one to group on.
Once you copy the code into the relevant files (template.php, veiws_list_ViewName.tpl.php and veiws_list_ViewName.css) it groups nicely. I must have been using the wrong fields to group on.
Now if only I could figure out where this info should go in the handbook...
Drew
Thanks for the
Thanks for the information.
Perhaps you can put it in the Views Handbook under 'Theming Your Views' (http://drupal.org/node/42597)
I just noticed there's already a handbook about a similar taxonomy grouping: http://drupal.org/node/42603
I don't know if that approach is different from yours..
I am interested in how you
I am interested in how you achieved this. I've viewed using Theme Wizard several times with no problem, but the grouped list is not working right for me. It is still listing the taxonomy term for each node in the view instead of once per group. I did tell it to group on my term field.
I created a support request in the Views project also: http://drupal.org/node/205771
I posted a workaround in
I posted a workaround in comment #4 of this issue: #205771: Theme Wizard - Grouped List