Add arbitrary number of different items that contain arbitrary number of equal items
Hi,
As the subjects says, what is the best way to allow persons to add arbitrary number of different items that contain arbitrary number of equal items. E.g. Choose between 0...n blocks containing a gallery, textpanel, etc. that contain 1...n images, textparagraphs.
The only way I know is to make subpages that represent each block and in that pages you can add images oder other elements via block list or nested items. But actually that's aftertaste of a workaround...
Unfortunately block list cannot contain nested items and vice versa.
I can use the grid layout but here you can only add basic elements like header or title. Of course you can add macros via the RTE that renders the markup ou want, but that is clumsy...
So does anyone knows a better approach that the subpages concept?
Hi @steschu!
It may be silent in here as it is a little difficult to understand what is the end goal here?
It's certainly possible to make a blocklist block that, itself, is another blocklist.
This means that you can create many nested-blocklists containing however many blocks that you see fit.
This is an approach we commonly take on our projects - like on Grouped-Accordions, for example, where you can have multiple image-blocks intertwined with text-blocks under an collapsible accordion drawer (which is a block itself)...
Perhaps this is enough to trigger that Eureka moment, otherwise share with us what exactly you're trying to do and I'm more than sure there are a bunch of people that would be glad to help.
Thanks for help - yes it is the nested block scenario that I meant. I didn't realize that blocks can be nested. I meanwhile have found also some resources about that topic that I'd like to share:
Add arbitrary number of different items that contain arbitrary number of equal items
Hi,
As the subjects says, what is the best way to allow persons to add arbitrary number of different items that contain arbitrary number of equal items. E.g. Choose between 0...n blocks containing a gallery, textpanel, etc. that contain 1...n images, textparagraphs.
The only way I know is to make subpages that represent each block and in that pages you can add images oder other elements via block list or nested items. But actually that's aftertaste of a workaround...
Unfortunately block list cannot contain nested items and vice versa.
I can use the grid layout but here you can only add basic elements like header or title. Of course you can add macros via the RTE that renders the markup ou want, but that is clumsy...
So does anyone knows a better approach that the subpages concept?
steschu
Anybody? I think this is a fairly common scenario.
Hi @steschu! It may be silent in here as it is a little difficult to understand what is the end goal here?
It's certainly possible to make a blocklist block that, itself, is another blocklist. This means that you can create many nested-blocklists containing however many blocks that you see fit.
This is an approach we commonly take on our projects - like on Grouped-Accordions, for example, where you can have multiple image-blocks intertwined with text-blocks under an collapsible accordion drawer (which is a block itself)...
Perhaps this is enough to trigger that Eureka moment, otherwise share with us what exactly you're trying to do and I'm more than sure there are a bunch of people that would be glad to help.
Hi Damian,
Thanks for help - yes it is the nested block scenario that I meant. I didn't realize that blocks can be nested. I meanwhile have found also some resources about that topic that I'd like to share:
https://umbraco.com/blog/deep-dive-the-block-list-editor/
https://24days.in/umbraco-cms/2021/advanced-blocklist-editor/
https://24days.in/umbraco-cms/2020/umbraco-block-builders/
Cheers, Stephan
is working on a reply...