3

Using views, I'd like to display a grouping of content, something like the following:

(category name for 1-3)
1. FIRST TOP-LEVEL ITEM
2. OTHER TOP-LEVEL ITEM
3. OTHER TOP-LEVEL ITEM
  3a. CHILD 1 of #3 ITEM
  3b. CHILD 2 of #3 ITEM
    - CHILD 1 of #3b ITEM
(category name for 4-5)
4. OTHER TOP-LEVEL ITEM
5. OTHER TOP-LEVEL ITEM
(category name for 6)
6. OTHER TOP-LEVEL ITEM

Using the Views Tree module, I can at least get the heirarchical relationships to work. However, I lose the ability to 'group' all the parent (top-level) items by their category (a taxonomy term).

If I don't use Views Tree, I can categorize all the items and group them under their respective categories, but I can't display the items heirarchically (I define the parent items using node references (References module for D7)).

Has anyone encountered the need to sort a view like this, and if so, how?? I'm at my wit's end trying to do these two kinds of sorts with Views (I'm really stretching my programming abilities here).

  • Will a Views Field View work within Views Tree? drupal.org/project/views_field_view – keva Jun 14 '11 at 3:09
  • Yes, but I don't think that would be the best way to resolve this... I would have to set up a view for each of the categories, and those categories are subject to change (quite frequently, I might add :(). – geerlingguy Jun 14 '11 at 4:58
  • You can use relationships, which has integration support for the Views module. – ram4nd Sep 10 '11 at 16:29
  • I ended up implementing and reworking the views tree theming function in my own module, and had to do a bit of work with a fellow developer to get things formatted correctly. You can see the fruits of our labor here: flocknote.com/network/255 (click on a 'show list family' tab under one of the lists). – geerlingguy Sep 12 '11 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.