1

When setting up contextual filters, its fixed setting is if the argument equals the result. I want to be able to choose if my result contains my argument string. How can this be done?

1
  • Please check this essential Topic for views and its path. Feb 21, 2018 at 15:06

1 Answer 1

3

Try using Views Argument Substitutions

Contextual Filters allow a View to be filtered based on arguments passed via URL or other embedded method (e.g. the View Reference module), but contextual filters are inflexible compared with normal filters (which allow for "contains," "begins with," "ends with," etc.).

This module allows contextual filter arguments to be used as replacement tokens in filters and table arguments, so that passed-in arguments (such as from URLs or View Reference fields) can be used as values in normal View filters.

enter image description here

4
  • Was this something you used on a previous project? I was looking for something where I didn't have to install another module with my ever growing module folder. thanks tho. Feb 21, 2018 at 17:23
  • @Patoshi it was something I just found, never had such scenario like yours come up yet.
    – No Sssweat
    Feb 21, 2018 at 17:47
  • 1
    but yes that module did do the trick for passing in arguments and then linking it back into the filter criteria section as a token reference. Feb 21, 2018 at 19:17
  • This was magic. Thank you!
    – Brittany
    Mar 19, 2019 at 20:11

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.