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

Allow |withoutKey filter to receive an array of keys #7230

Closed
simonkuran opened this issue Dec 6, 2020 · 3 comments
Closed

Allow |withoutKey filter to receive an array of keys #7230

simonkuran opened this issue Dec 6, 2020 · 3 comments
Labels
enhancement improvements to existing features site development 👩‍💻 features related to website/API development
Milestone

Comments

@simonkuran
Copy link

I would be nice if the |withoutKey Twig filter could be passed an array of keys to be removed.

Instead of:
{% set config = config|withoutKey('maxWidth')|withoutKey('maxHeight')|withoutKey('class') %}

It would be cleaner to do something like this:
{% set config = config|withoutKey(['maxWidth', 'maxHeight', 'class']) %}

@brandonkelly brandonkelly added enhancement improvements to existing features site development 👩‍💻 features related to website/API development and removed enhancement labels Dec 8, 2020
brandonkelly added a commit that referenced this issue Dec 8, 2020
@brandonkelly brandonkelly added this to the 3.6 milestone Dec 8, 2020
@brandonkelly
Copy link
Member

Added for 3.6!

@brandonkelly
Copy link
Member

Craft 3.6 RC2 is out now with this change.

mattstein pushed a commit to craftcms/docs that referenced this issue Jan 26, 2021
@brandonkelly
Copy link
Member

Craft 3.6 has now been officially released ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features site development 👩‍💻 features related to website/API development
Projects
None yet
Development

No branches or pull requests

2 participants