By held69 on
With CCK (number module) it's possible to give 1 or more numeric values to a node.
I would like to know if its possible to give a range of numbers to a node.
EXAMPLE
The range 5-10
With range i mean that while creating the node you can fill in a lower value (5) and a upper value(10).
After creating the node should have the range of values 5 - 10
Searching between 5 and 10 should give this node as a result.
Comments
If you made two CCK fields,
If you made two CCK fields, one being the lower value and one being the higher value, you could create a view that would filter nodes where field_lower > 5 and field_higher < 10. Exposing the filters would allow the users to specify their own values.
Thanks for your swift reply I
Thanks for your swift reply
I have created the view as you mentioned and can say that it works.
However i think i made a little mistake in describing my example.
It is about the usabilty of the search function.
For a search, users have to fill in two values, if one is 'out of range' the node will not show up, which is not quit userfriendly i think.
It would be a good thing if users could only fill in one value, if this value is between the lower and higher value of the node,
the node should show up.
Would this be possible?
Try Finder.
Try Finder. http://drupal.org/project/finder
After trying finder, i have
After trying finder, i have been thinking of the following:
instead trying to find a solution from a searching point of view, i think it would be a lot easier to trie to configure something at the input side.
Isn't it possible to create two numeric fields (maybe a computed field) on the 'node/add page' .
One field should be filled in for a lower number and one for a higher number.
Now i'm not a coder but maybe it's possible to create some code that would give the given node not only
the lower and the higer value, but also all the value's in between.
And that way one can search with one value as input(equal to)
I see your point. Maybe you
I see your point. Maybe you want to find a module that uses Views for search results. That would allow you to filter it as you like.
thanks moving this to
thanks
moving this to computed field:
http://drupal.org/node/565304
module to try:
http://drupal.org/node/620484