0

I need to do some complicated filtering on my View and it seems that contextual filters lack the operators (e.g. between, greater than) available within the exposed filter configuration. However, I don't want to user to be able to see or amend any filter widgets.

I can achieve this by setting the exposed filters to appear as a block and NOT assigning the block to the page. I can then invoke the View by constructing a path with whatever querystring I wish and the filters are applied appropriately (e.g. www.mywebsite.com/myview?field_range=10&field_color=red).

Is there anything inherently wrong with this approach to using views, or any disadvantages?

1 Answer 1

1

Nothing wrong with your approach. i have used it myself a couple of times and seemed to have worked pretty well.

regarding the situation you faced, contextual filters are more sort of an argument rather than a filter so the miss the comparison operators.

The tool in view to use external input to filter is the exposed filter. that is what it is designed for and I think you can go ahead with this approach.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.