-
Notifications
You must be signed in to change notification settings - Fork 638
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]:{% namespace %}
Twig tag should allow 0
#13943
Comments
Oh, managed to track down where that is, keen to hear your opinion on #13944 |
Namespaces are used to prefix I’ve just added a check to ensure namespaces follow You can work around that by prefixing your keys with a string, e.g. |
Nevermind, that turned out to be pretty heavy-handed, and I forgot that we’re already ensuring namespaces are properly formatted for Your PR is now merged for the next Craft 4 release, and I’ve adjusted |
Cheers! I know it's kinda a "dumb" PR, but might be handy in some instances... |
4.5.13 is out with that change! |
What happened?
Thinking that the
{% namespace %}
tag should accept0
as a value, and it currently doesn't. Probably to do with a falsey check, but I can't figure out how that works, sorry!In reality, this would be surrounded by
fields
and the field handle, but in this reduced example, you can't have multiple{% namespace %}
tags, so in a real-world use-case you'd produce:My use-case here is that the value for a field is an array, and I'd like to keep things simple by using an array syntax, rather than
new1
or similar like Matrix does.Craft CMS version
4.5.9
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: