opengeek/getResources — pull request #60 by mattsenior (2012-01-11 12:52:07+00:00)
Title: tvFilters Custom Logical AND/OR Delimiters

Hello,

I found myself wanting to match a literal comma character in tvFilters, so thought it might be useful to allow a custom logical AND delimiter.

While wanting to match a comma is much more likely than wanting to match ‘||’, I thought it would make sense to allow a custom logical OR delimiter as well.

New parameters:

tvFiltersAndDelimiter - (Opt) Custom delimiter for logical AND, default ‘,’, in case you want to match a literal comma in the tvFilters. E.g.:

&tvFiltersAndDelimiter=`&&` &tvFilters=`filter1==foo,bar&&filter2==baz`

tvFiltersOrDelimiter - (Opt) Custom delimiter for logical OR, default ‘||’, in case you want to match a literal ‘||’ in the tvFilters. E.g.:

&tvFiltersOrDelimiter=`|OR|` &tvFilters=`filter1==foo||bar|OR|filter2==baz`

I hope this is useful, please let me know if there would be a better way to achieve this…

Cheers,

Matt