Forum Discussion
sp_alx
Apr 20, 2020Copper Contributor
How to add a web part to a modern page programmatically in SharePoint 2019?
Hello,
I am looking for a way to add a web part to a modern page programmatically in SharePoint 2019 on premises.
What I want to accomplish is a custom news page, which has an additional site property "Category", which can be displayed and edited through a web part. Is seems to be possible with Pnp in SharePoint Online as described here but I can't find anything for 2019.
Thanks!
- Another approach here could be to use PnP templates to get a template where you simply customize an existing page with the WebParts you want to add