Forum Discussion
SP_Bogdan
Apr 08, 2019Copper Contributor
Custom Page Layouts with Modern Pages in SharePoint 2019
Hello Is there any way to provision custom page layouts associated with content types with modern pages in SharePoint 2019? For example in an intranet scenario we have various custom content types t...
- Apr 09, 2019Unfortunately the answer is No, even we don't have yet custom page layouts in SPO (they are coming)
Beau Cameron
Apr 09, 2019MVP
Deleted You can use CSOM for this. I personally use PnP to do this kind of work. They have libraries for PowerShell and for C# to help you do this.
Here is a great video from a while back on how to do this.
Deleted
Apr 09, 2019Beau Cameron Thanks for the suggestion. Could all that code be done client side somehow and available to content users via GUI? Obviously content authors don't have access to C# / CSOM and so on. They want an easy workflow. Create a new page, click a button to change layout and start content authoring.
Thank you
- Beau CameronApr 09, 2019MVP
Deleted Look into PnPJs, they have some functionality to make it easier to work with pages.
https://pnp.github.io/pnpjs/sp/docs/client-side-pages/- DeletedApr 09, 2019
Beau Cameron Thank you! Is there a way to create a drop down menu on the page mini ribbon to allow you to chose a "layout". Once the layout is chosen the PnPJS code you suggested would run to reconfigure the current page in view (in edit mode)? See attachment. Appreciated
- Beau CameronApr 12, 2019MVP
Deleted Unfortunately, not that isn't something you can do currently.