Forum Discussion
Custom Page Layouts with Modern Pages in SharePoint 2019
- Apr 09, 2019Unfortunately the answer is No, even we don't have yet custom page layouts in SPO (they are coming)
jcgonzalezmartin Thanks
Is there any way to implement a custom extension that would add sections with the desired section layout and perhaps add some webparts onto the page once the page is created? From a content author's workflow perspective this could look like this: create a new page, apply custom news "layout" and start authoring.
Thanks
- Apr 09, 2019No to my knowledge, the thing here is that you cannot create custom layouts...but you could "simulate" it by adding WebParts to existing layouts and here the extension idea could work
- DeletedApr 09, 2019
Are you aware of any code that you could point me to that allows you do add a section to a page, configure the section's layout (like one column, 2 column, etc ) and code that allows you to add webparts to pages and sections in the right columns? Thanks
- Beau CameronApr 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.