Skip to main content
edited title
Link
GiorgosK
  • 8.5k
  • 1
  • 42
  • 55

Taxonomy terms with numeric names and searching between its valuesviews filtering within range

added 11 characters in body
Source Link
Viktor
  • 133
  • 7

I have a very large taxonomy vocabulary with numeric taxonomy term names like: 10123,10124,10125,... etc. My node have a min value field and max value field. Both fields are taxonomy referenced fields with this vocabulary. How I can create views filter to find a nodes, where exposed filter value is between these two fields?

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max:Taxonomy term with name "11000"
  • Exposed filter value: 10800

This is TRUE, so this node must be in views result.

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max: Taxonomy term with name "11000"
  • Exposed filter value: 11500

This is FALSE, so this node should not be in views result.

Exposed filter value can be as taxonomy term autocomplete widget.

Any ideas, how it can realize?

I'm looking a solution in _views_query_alter, but I still can not understand is this right way?..

I have a very large taxonomy vocabulary with numeric taxonomy term names like: 10123,10124,10125,... etc. My node have a min value field and max value field. Both taxonomy referenced fields with this vocabulary. How I can create views filter to find a nodes, where exposed filter value is between these two fields?

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max:Taxonomy term with name "11000"
  • Exposed filter value: 10800

This is TRUE, so this node must be in views result.

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max: Taxonomy term with name "11000"
  • Exposed filter value: 11500

This is FALSE, so this node should not be in views result.

Exposed filter value can be as taxonomy term autocomplete widget.

Any ideas, how it can realize?

I'm looking a solution in _views_query_alter, but I still can not understand is this right way?..

I have a very large taxonomy vocabulary with numeric taxonomy term names like: 10123,10124,10125,... etc. My node have a min value field and max value field. Both fields are taxonomy referenced fields with this vocabulary. How I can create views filter to find a nodes, where exposed filter value is between these two fields?

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max:Taxonomy term with name "11000"
  • Exposed filter value: 10800

This is TRUE, so this node must be in views result.

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max: Taxonomy term with name "11000"
  • Exposed filter value: 11500

This is FALSE, so this node should not be in views result.

Exposed filter value can be as taxonomy term autocomplete widget.

Any ideas, how it can realize?

I'm looking a solution in _views_query_alter, but I still can not understand is this right way?..

Source Link
Viktor
  • 133
  • 7

Taxonomy terms with numeric names and searching between its values

I have a very large taxonomy vocabulary with numeric taxonomy term names like: 10123,10124,10125,... etc. My node have a min value field and max value field. Both taxonomy referenced fields with this vocabulary. How I can create views filter to find a nodes, where exposed filter value is between these two fields?

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max:Taxonomy term with name "11000"
  • Exposed filter value: 10800

This is TRUE, so this node must be in views result.

Example 1.

  • Node field min: Taxonomy term with name "10500"
  • Node field max: Taxonomy term with name "11000"
  • Exposed filter value: 11500

This is FALSE, so this node should not be in views result.

Exposed filter value can be as taxonomy term autocomplete widget.

Any ideas, how it can realize?

I'm looking a solution in _views_query_alter, but I still can not understand is this right way?..