I have a shared content builder matrix field that has the usual blocks: Redactor, Headings, Images, etc.
A typical entry might look like this:
- Heading - Redactor - Image - Redactor - Heading - Redactor - Heading - Redactor - Image
Ideally I'd use a nested matrix - I'm aware this is on the roadmap and Super Table / Neo do support this but I'd like to reuse my shared content builder field and handle the output via the templates.
On the page I'd like to output it like so:
- Heading | - Redactor | - Image | - Redactor - Heading | - Redactor - Heading | - Redactor - Heading | - Redactor - Image
Basically grouping by heading block and then output any content until the next heading block.
I've seen a couple of examples which are similar to this but I haven't been able to get the template and queries right for this.
I know I can use the group filter but I'm having trouble with not being able to
break out of a loop. Fairly sure I need to construct a list of structured
id's and output them that way.
Anyone done something similar to this or can shed some light?