I am creating a Materialize-UI based Grid (CMS authorable) to reduce no of fixed/static layouts in the application. CMS side - I've created Row & Column templates, One grid rendering & Datasource (which has row & it's child columns with required materialize info). Code side - I've used hard code seed value i.e. 10 for the dynamic placeholder inside a foreach loop which runs equals to the no of columns suppose 5 in the datasource. For each iteration, the seed value increments by 1 (seed = 11, 12, 13, 14, 15) and creates 5 dynamic placeholders which are used to add 5 renderings/components on the page. It works fine when i publish and run the page.
However, when i delete the 4th column from the datasource, publish and run the page then, the component which was set for seed no 15, doesn't load, Because this time seed no 15 is not created which is set in the presentation details of the page.
To resolve this issue, I thought of adding a seed id for each row & column in the CMS & use that for dynamic placeholder creation and it works fine for me.
However, I think this is hard for content author to assign unique id for each Row & Column in the CMS. Therefore, I am looking for a good solution here to handle seed value dynamically?