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.

CommentFileSizeAuthor
#5 term-weight-filter_961148_5.patch451 bytesSteffenR
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Category: feature » task
Issue tags: +Novice

That's a valid task

McGrimm’s picture

+1

barbi’s picture

Subscribing. (Newbie to drupal, Wish there was a watch this issue)

jenlampton’s picture

I 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"

SteffenR’s picture

Status: Active » Needs review
FileSize
451 bytes

Attached 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

dawehner’s picture

Status: Needs review » Fixed

Awesome! Committed to both 6.x-3.x and 7.x-3.x

Status: Fixed » Closed (fixed)
Issue tags: -Novice

Automatically closed -- issue fixed for 2 weeks with no activity.