Nested repeat regions with different view partials

I’m evaluating if Wappler is suitable for building a simple CMS, which generates a simple landing pages, containing a list of blocks - text, link, image, collapse etc.
I read an amazing guide on Nested Repeat Regions, but it solves only part of the problem. In this example all repetitive items are of the same view type. When creating a landing, all items might be different.

Server connect returns a list of blocks (text block, link, image), and also block options for each block. But this options are different for text block, link block etc.
Also, every block requires different view component - for link it will be button, for text it will be paragraph etc.

Any ideas on how to do it in Wappler?
I thought I may use SSI inside a repeater, but it looks impossible.

I intend to keep landing pages data in a database, with the following tables

  1. blocks (id, type_id),
  2. types(id, type_name), like button, image, text, collapse
  3. options (block_id, option_name, option_value)

An example of server connect return is below:

{"get_page_blocks":[
{"block_id":5001,"name":"Button"},
{"block_id":5003,"name":"Text"},
{"block_id":5004,"name":"Button"}],
"repeat_block_options":[
{"name":"Button","block_id":5001,"block_options":[
{"id":101,"button_type":"link"},
{"id":102,"link":"http://example.com/landing"},
{"id":103,"link_color":"#ffffff"},
{"id":105,"link_bg":"#7795f8"}]},
{"name":"Text","block_id":5003,"block_options":[
{"id":111,"text":"hello World!"},
{"id":112,"text_size":"m"},
{"id":113,"text_color":"#ffffff"},
{"id":115,"text_bg":"#7795f8"}]},
{"name":"Button","block_id":5004, "block_options":[
{"id":101,"button_type":"email"},
{"id":102,"email":"johnsnow@example.com"},
{"id":103,"text_color":"#ffffff"},
{"id":105,"button_bg":"#7795f8"}]}]}

Maybe there is a better way of doing it. I appreciate any advise.

Community Page
Last updated: