Thanks, so when I made this the block layout wasn’t around.
So the site that I built this for, there were a large number of different types of blocks, but only a few that actually appeared on every type of row. There is one in particular that was repeated often which I called a “Media Block”. This is used in multiple rows and multiple sizes per row, so I created a standard ‘media block’ and duplicated using a naming convention based on the row it was in:
I’ve attached the JSON for this.
In the template files there was no flexible content logic, I kept all that to a set of MVC style classes. So a controller that handles all of the flexible content selection, then a set of dumb views for actually outputting HTML from the controller.
Hope that helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.