Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I've a view of taxonomy type and want to filter by the weight of the terms, i.e. I need only terms with weight=0.
The filter panel gives me only "Term ID", "Term" and "Vocabulary" options.
Is it possible to have also "Term weight" ?
Thanks In Advance.
Comment | File | Size | Author |
---|---|---|---|
#5 | term-weight-filter_961148_5.patch | 451 bytes | SteffenR |
Comments
Comment #1
dawehnerThat's a valid task
Comment #2
McGrimm CreditAttribution: McGrimm commented+1
Comment #3
barbi CreditAttribution: barbi commentedSubscribing. (Newbie to drupal, Wish there was a watch this issue)
Comment #4
jenlamptonI wanted to add a filter for weight = 2 and came up with this temporary work-around:
Add a relationship for term: parent, and an argument for term:parent that uses the relationship. (If needed, on the argument you can set the "Action to take if argument is not present" to "Fixed entry" and provide the TID of the grandparent term.)
This creates the same result as if you had added a filter for weight = 2, or an argument of term: grandparent = TID.
Perhaps something similar could be done for different weight "filters"
Comment #5
SteffenRAttached you find a patch to supply the desired filter by weight. I hope it's ok to set the handler for the field to numeric..
SteffenR
Comment #6
dawehnerAwesome! Committed to both 6.x-3.x and 7.x-3.x