Infinite lazy region list

Hi

I have now made myself an all purpose grid layout based on a scss grid implementation (similar to boostrap).

I would like to be able to not configure regions with name in the layout.xml file.
Because I want the number of regions to be based on how many cells I add via an item set.

Example: Lets say you have a page that on desktop has
1 row with 3 cell
1 row with 2 cells and some offsets
1 row with 3 cell
Note: in another breakpoint there will be a different number of cells per row and offsets, so you cannot use row as a layout…

That would be 8 cells in total so 8 regions is needed.

My current workaround is to define regions with numerical names, and as many as I need on the most complicated page. But that means that whenever a more complicated page comes around, I need to add more regions to the xml.

So it would be easier if I don’t have to define regions and simply access them in the controller from a list…

The reason why regions must be decleared in the xml is so this will also work properly in the API without invoking any controllers.

Why not simply make layout’s for this purpose? Have you tested the wireframe app for instance?

I was always talking about regions in a layout.

Which API?

I don’t find much about layouts in this API at least?
http://repo.enonic.com/public/com/enonic/xp/docs/6.5.1/docs-6.5.1-libdoc.zip!/index.html

You can for instance see this in action if you open the component view when editing a page - the list of regions are fetched from the configuration without executing any controller. I guess this has not been exposed to the Javascript API yet. It relates to the page object which is an optional property of any content object.