I have a site with three “sections”, blog, shop and portfolio. Each section is one page with a different template. The blog accepts only pages of type “post” as children, the shop only “products” and the portfolio only “projects”. This is the only difference between these three pages, otherwise they could use the same template, the same controller, the same model and the same blueprint. Their only difference is in the subpage settings of the blueprint.
I am trying to find a way to use the same template, blueprint, etc… for these pages and yet maintain the limitation on what kind of children each accepts. I has thinking that I could add a select field on the pages where one can select the type of subpages that the page accepts. Then maybe use a hook (
panel.page.update) to either write this selection on the pages blueprint or a different hook (
panel.page.create) that fires whenever a child page is added.
Is there a way to access and modify the subpage setting for a page through a hook?