Open jptissot opened 3 years ago
@deanmarcussen says you are rendering two things in the same zone (same list of shapes). While the zone is iterated to be rendered, something else is added to it. You can't add something to the "Modal" zone while you are rendering "Modal". You should create a distinct one.
What if a template that I am referencing via a content picker renders something in the same zone I am rendering? Would it be possible to insert the value at the end of the zone ?
technically possible @jptissot but weird, because zones (all shapes) support both being in the zone, and the position in the zone, so realizing the collection first, then adding an extra to it, would leave it unsorted and weird.
The solution here, is probably to use placement to locate it. Because placement is applied before rendering, getting around the issue entirely.
Or as suggested above use two zones - something I've done many times, so in your case you might have Modal
and ModalContent
Content
are executed first and zone rendering are extracted and placed in defined zones.
It’s bad idea to place a shape to a rendering zone. Here it’s rendering on same zone. But if you are trying to place a shape to Header zone while rending Footer zone, will not render the shape to header zone as header zone is already processed before Footer
If you are using {% zone "Modal" %}
in template then always render that shape inside Content
Describe the bug
Rendering a widget in a layer zone that references content that also renders in the same zone throws exeption.
I have a Widget that has a content picker and the template renders the items.
If I place the
ContentReference
widget in a layer zone calledModal
and reference content that also outputs to the sameModal
zone. I get the exception below.Screenshots