Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
How can I sort my table that is grouped by one field. I want it sorted by a second field and then a 3'rd field.
Like this:
Group: Harvest 2008
Type Item
------------
Corn Rye
Corn Wheat
Fruit Apples
Fruit Bananas
Fruit Oranges
So first the field 'Type' is sorted and then the field 'Item' is sorted (under Type occurrences).
Is this possible with the existing Views2?
Or is it necessary with another contrib module - or possible at all?
Thanks for all your help.
Morten E
Comments
Comment #1
MBroberg CreditAttribution: MBroberg commentedThat would be great but so far the answer seems to be "not currently possible."
I did do something with "group by" to get extra fields in the headers.
See comment at
http://drupal.org/node/673982#comment-2504410
By using node references I was able to get more information into the view.
For now I think this is the limit of what is possible.
Comment #2
esmerel CreditAttribution: esmerel commentedNo activity for 6 months, comment 1 appears to have a good suggestion to resolve issue.
Comment #3
MBroberg CreditAttribution: MBroberg commentedI don't think my suggestion really resolves the issue. It is just a temporary way to get more than one field in a "group by." What is really needed is multiple "group by" levels, similar to "sort criteria" where a person can select a field to group by and then another field under that, and so on.
For example, in a regular view you can group by only one field such as state:
California
--restaurant, address
--restaurant, address
--restaurant, address
--restaurant, address
Arizona
--restaurant, address
--restaurant, address
--restaurant, address
--restaurant, address
With my suggestion in #1 you can still only group by one field, but put more details into that field
San Diego, California
--restaurant, address
--restaurant, address
Los Angeles, California
--restaurant, address
--restaurant, address
--restaurant, address
What is really needed is more like:
California
-Sandiego
---restaurant, address
---restaurant, address
-Los Angeles
---restaurant, address
---restaurant, address
Arizona
-Phoenix
---restaurant, address
---restaurant, address
As far as I can tell that is still not currently possible and still requested frequently by many Drupal users.
We need multiple "group by" levels.
Comment #4
dawehnerThis issue is closed because there was no activity/no active patch etc. in the last 6 months.
As you see this is a really feature request. Please don't disagree with the maintainer of views
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedMulti level grouping is something I would like but have never tackled. Moving to active task.
Comment #6
arx-e CreditAttribution: arx-e commented+subscribing
I have been searching for a few hours for a way to list in a view some hotels grouped by prefecture grouped by region but I have found no way to do it yet.
Any workarounds/suggestions known for the time being?
Comment #7
dawehnerThere is already some work buy really just some work on #477338: Multiple group: group by more than one field
Comment #8
WillHall CreditAttribution: WillHall commentedFaced a similar issue recently - let me know if this helps.
http://mrtheme.com/cms/drupal/drupal-7-building-tree-like-displays-in-vi...
That is a little out of date, in the end this was the solution for me.
Comment #9
arx-e CreditAttribution: arx-e commentedThank you for your replies.
Will, it seems you have a solution but... even if I was using D7 (which I am presently not), it would take me at least 2 days with dull weather and clear mind to get to grips with it... I have never gone so deep with Drupal till now.
Since my level 0 categories are finite and not exceeding a dozen, I think that I will set up this page with multiple predefined views and viewfield.
Comment #10
MustangGB CreditAttribution: MustangGB commented