hey there, I figured it would be nice to use this module for my taxonomy term view, but I noticed that using the following term structure:
term1
term2
- subterm1
- subterm2
- subterm3
term3
where term1, term3 and subterm1 have content, it shows those 3 in my cloud instead of term1, term2 and term3
so I will try to hack this module a bit and come up with a sensible patch with like a checkbox for "these are texonomy terms and I want you to use to top level one"
or would this be a wrong sort of approach? should I be changing the way the summary results are built instead?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views_cloud.patch | 3.05 KB | seutje |
| #2 | views_cloud.patch | 3.01 KB | seutje |
Comments
Comment #1
seutje commentedposted in wrong issue queue
Comment #2
seutje commented*patched*
was remarkably easy, thanks for keeping a clean code, feel free to rape this patch if you think anything should be done some other way
so basically this will add an option to the cloud settings entitled 'Taxonomy: use top level terms' - 'Checking this box will make use the system assume it's dealing with taxonomy terms and it will aggregate results to the top level term.'
when that box is checked, it will try to find the top parent for each result, replace each child with that parent, check for duplicates, aggregate results from duplicates and delete leftovers
Comment #3
seutje commentedshows top terms twice when 2 child terms have nodes
Comment #4
seutje commentedchanged it a bit to aggregate the count and delete duplicates properly
Comment #5
seutje commentedsizes don't seem to be accurate when aggregating terms to their top level parent
not a priority in current project, will look into it when I have time available
Comment #6
seutje commentedComment #7
quicksketchThis patch doesn't seem appropriate to this project. Instead it should be a self-standing argument that can be used with or without Views Cloud. It's a perfectly reasonable request to have a list of top-level taxonomy terms in a listing, without a cloud at all.