Needs review
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
taxonomy data
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2011 at 11:20 UTC
Updated:
7 Jan 2019 at 21:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerIf you would like to add this feature you would have to add something to views/modules/taxonomy/views_handler_field_term_node_tid.inc
Comment #2
ParisLiakos commentedThanks for the hint,helped me a lot:)
Couldn't find a way to apply it to the query, except
groupby()but that would give me one term.So i applied it in the foreach loop.
Comment #3
dawehnerIt seem to make more sense to provide 0 as no limit by default.
In general it should be possible to limit the query, hopefully.
Comment #4
ParisLiakos commentedYes i tried limiting the query,first thing but this query returns the terms for all the current nids.
So if i apply
range()to the query it will get the first terms from all the nodes aggregated.I dont think there is a way to apply a limit inside the query for each node
Comment #5
ParisLiakos commentedChanged it according to #3
Comment #6
ParisLiakos commentedComment #7
deggertsen commentedI was able to port the patch in #5 to the 6.x-3.x-dev branch. See #668230: Limit values displayed of field "Taxonomy:all terms".
Thank you rootatwc, patch appears to work great!
Comment #8
ParisLiakos commentedNo problem:) patch indeed works,but still the best way would be to filter them inside the query,but maybe its not possible...maybe an sql guru could help more,but this is the best solution i could find.cheers
Comment #9
dawehnerMarked the other issue as duplicate to keep things easy.
Comment #10
tim.plunkettTriggering the testbot.
Comment #12
ParisLiakos commentedhmm patch now fails,so i recreated it agtainst latest dev
Comment #13
ParisLiakos commentedoops.status change
Comment #14
marcoBauli commentedsome work going on about something similar for 6.x-2.x-dev here: http://drupal.org/node/769136
Comment #15
dagmarThere is an extra space after the =.
I think you should provide more help in the description. Something like. Use 0 to display all the terms.
Mmm. I'm not really sure if $term->node_nid is enough flexible.
I mean, nodes are not the only entities that can be categorized.
Comment #16
matt v. commentedI've updated ParisLiakos's patch from #12 to incorporate most of dagmar's suggestions from #15.
Regarding dagmar's comment that "...nodes are not the only entities that can be categorized," I didn't make any changes to that section because this part of the Views code (views_handler_field_term_node_tid) appears to be concerned specifically with terms on nodes.
I did change the name of the new limit from "limit_items" to "limit_quantity" because it seemed more descriptive to me.
It didn't make sense to me that the new option was relegated to the "More" section at the bottom of the modal window. I wasn't initially able to find the new form field, until I first looked at the code. That said, I didn't change it, but I think it would be something to consider.
Comment #17
chris matthews commentedThe 5 year old patch in #16 to views_handler_field_term_node_tid.inc applied cleanly to the latest views 7.x-3.x-dev and if still applicable needs review.