Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OutputFilter] Add 'notinarray' modifier #16476

Open
Spheerys opened this issue Sep 26, 2023 · 1 comment
Open

[OutputFilter] Add 'notinarray' modifier #16476

Spheerys opened this issue Sep 26, 2023 · 1 comment
Labels
feature Request about implementing a brand new function or possibility.
Milestone

Comments

@Spheerys
Copy link

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)

@Spheerys Spheerys added the feature Request about implementing a brand new function or possibility. label Sep 26, 2023
@Ruslan-Aleev
Copy link
Collaborator

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

@rthrash rthrash added this to the v3.1.0 milestone Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request about implementing a brand new function or possibility.
Projects
None yet
Development

No branches or pull requests

3 participants