revolution
revolution copied to clipboard
[OutputFilter] Add 'notinarray' modifier
Feature request
Summary
Filter results by excluding some results
Why is it needed?
I'm frustrated when I want to filter result by exclude some resource.
Example : [[+id:notin=5,15,22
:then=Yes, it's not in array
]]`
The modifier "inarray" exists and works well, but in some case it could be more efficient to use the oposite "notinarray"
Suggested solution(s)
Add the the modifiers notin, NOTIN, notinarray, notinArray with this purpose : Check to see if the value is not in an array (comma seperated)
You can add a modifier via PR, if you have the time.
For an example, see the current IN
modifier - https://github.com/modxcms/revolution/blob/3.x/core/src/Revolution/Filters/modOutputFilter.php#L699