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

[4.x] Support arrays in wrap modifier #8942

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

jacksleight
Copy link
Contributor

This PR allows you to pass arrays to the wrap modifier. So you can do:

{{ test = "one two" }
{{ test | wrap('span') }}
{{ test | explode(' ') | wrap('span') | join(' ') }}

Resulting in:

<span>one two</span>
<span>one</span> <span>two</span>

@jackmcdade jackmcdade merged commit 7ffbb4c into statamic:4.x Nov 6, 2023
18 checks passed
@jackmcdade
Copy link
Member

I like it!

@jacksleight jacksleight deleted the wrap-modifier-arrays branch November 6, 2023 20:14
duncanmcclean added a commit to statamic/docs that referenced this pull request Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants