- 🇺🇦Ukraine abramm Lutsk
Here's a reroll of #14 for those of us upgrading to D11.
Currently the without
Twig filter doesn't allow specifying nested keys to exclude.
We can't just update without
to accept an array for a nested key, because it's already been updated to accept arrays and assume they're just sequences of base-level keys in
#3093577: Let Twig without() filter take both arrays and strings as arguments →
.
We could
{{ content|without('parent.child1', 'parent.child3') }}
.
' is a legit character in existing keys (I don't believe it is), we could find something else that's safe. E.g. '/
' or whatever.
Or we could use the wonky array syntax at the end of
#5
✨
Support removing nested elements in Twig 'without' filter
Needs work
and use ']['
or equivalent.
without_nested
anyone?)
without
and add nested value support to D10.
Decide if it's safe to use a delimiter character, and if so which one. It looks like menu-local-tasks.html.twig
for example can have periods in key names.
Under Drupal 8.6.5, after installing the module Field Layout, the filter function 'without' in the templates for my paragraphs, for example, is ignored. Once uninstalled the filter works fine again.
For example, if I put this in the twig template for a certain paragraph:
{{ content|without('field_label') }}
The field label is shown when the Field Layout module is installed.
Needs work
11.0 🔥
theme system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Here's a reroll of #14 for those of us upgrading to D11.