unikent / astro

MIT License
7 stars 2 forks source link

Baking pages includes all sections and regions for the page layout. #224

Closed samyapp closed 6 years ago

samyapp commented 6 years ago

Fixes #212

Baking pages worked by creating the page data structure from the blocks in the database for that page.

This meant that any optional sections with no blocks currently configured would not be present in the baked data.

This fix first creates an empty (blockless) page data structure containing all regions and sections for the page's layout and then adds all the blocks from the database for the page to this structure.

cfc7-unikent commented 6 years ago

looks good, tested in ui and phpunit