Problem/Motivation
The region.html.twig's content is markup, so one solution to partially rendering the content of the region would be to rely on elements renderable array.
However, without filter doesn't work in this case, the entire content is printed anyway.
Inspecting the filtered array shows that the removed elements aren't actually there.
Steps to reproduce
Inside region.html.twig try to print elements partially, e.g.
{{ elements|without('bartik_content') }}
bartik_content shouldn't be printed, but actually it is.
On the contrary, ispecting the variable, e.g.
{{ dd(elements|without('bartik_content')) }}
the dump shows the array doesn't contain bartik_content
Comments
Comment #2
idebr commentedHi Giuseppe87,
This is being fixed in #3178202: Render blocks later, so they can be placed individually in a region template. I'll close this issue as a duplicate, so we can focus our efforts in the related issue.
Comment #3
giuseppe87 commentedThank you, I searched for related issues but didn't find that.
Probably the scope of this is kinda different (why
withoutdoesn't work onelementsof region?) but if the #3178202 provides acontentthat can be manipulated, that will even a better solution.Comment #4
marcvangendMeanwhile, #3178202: Render blocks later, so they can be placed individually in a region template was RTBC, but it's back to Needs Review because of the tests that were added. If this matters to you (indeed @Giuseppe87, it provides a
contentthat can be manipulated) please help review it so we can get it committed.