To deal with this issue I ended up refactoring the children items to have their own renderings (Accordion Section
) and be inserted into my datasource folder rather than nested under my accordion item. My Accordion
rendering changed to pretty much just have markup to show a title field and a placeholder which allows Accordion Section
renderings. I could have removed the datasource item for this rendering if there wasn't a title field to be displayed along with each accordion and it was just going to be the placeholder that allows adding Accordion Section
renderings.
This fixes my issue involving the refresh alert however it will be a little less obvious how this module works in content editor because there isn't a hierarchy shown in the tree, it's all based on where the rendering is. For example my tree can look like this:
Page
_datasourceFolder
Accordion
Accordion Section 1
Accordion Section 2
The order that Accordion Section 1
and Accordion Section 2
show up in the tree does not really matter. The order is determined by the renderings that point to them on the item noted as Page
. I wanted to nest these under the item noted as Accordion
. I almost got this working with a query for the datasource location for my Accordion Section
rendering however in the event that there are 2 accordions on a page this fell apart so I left the datasource locations of those to be my datasource folder. Since my client is going to be far more reliant on experience editor mode rather than content editor mode this should be fine.