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 Answer
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.
-
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. Feb 21, 2018 at 17:47
-
1but 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
-