Hello, I've been searching through all the issues and I've been unable to find a solution for this.
I've set up an exposed filter for taxonomy terms using the Hierarchy Select module. When the user applies the filter, the results of the view are set to be grouped by Taxonomy: Term. The problem is that the grouping header only displays the parent term, whereas I need the parent and all children displayed in the grouping header.
For example, if a user selects:
Parent Term
-Child Term
--Grandchild Term
Then I'd like the grouping header to display:
Parent Term - Child Term - Grandchild Term
I've tried grouping by Taxonomy: All Terms, but that actually changes the results of the view and I end up with duplicate nodes or the wrong taxonomy combination. Is there a simple way to do this that I'm missing?
Comments
Comment #1
merlinofchaos commentedViews does not support ordering by taxonomy terms hierarchically because there is no easy way to sort them in that order. There used to be a module called 'Taxonomy lineage' that added that. I have no idea if that module is kept current anymore.
Comment #3
sansui commentedJust curious if you got anywhere with this gallegos. I'm looking to achieve the same effect using views to display parents, but after reading dozens of threads on the subject and another recent confirmation here, it sounds like this doesn't exist in views because of the sorting problems.
A module like node hierarchy could be used, instead of taxonomy, to build parent/child lists, but it's clumsier than taxonomy IMO, and doesn't give you the nice search/categorization options that you can get with taxonomy.
Here's to hoping that one day being able to group by multiple parent terms will become a reality in views :D
Comment #4
sansui commentedI haven't tried out this solution myself yet, but after some extensive googling I came across this blog entry about creating hierarchical listings in views and displays parents as in a directory structure - http://www.group42.ca/hierarchical_listings_in_views_2_replicating_the_l...
Comment #5
sansui commentedFollowing the example in the blog entry, I'm using this in my "unformatted" views tpl for my particular view:
This works great and is almost exactly what I need - just need one little step further that I can't figure out. I'd like to give the top level parents a different formatting - how can I break it apart so that the very top level of terms gets something like h1 and every other term heading gets h2.
Comment #6
zeezhao commentedsubscribing
Comment #7
summit commentedBookmarking, greetings, Martijn