Quite new to the PnP framework, but it’s something I’m very keen to fully understand and make use of in our organisation. So far, I have managed to provision a team site based on our organisational template.
However, a couple of things still elude me which would ensure our existing template would have parity with the PnP one. The first area is customising the OOTB document library with our own custom content types and site columns. I’ve managed to do it for the initial provisioning process, but the bit I’m drawing a blank on is when a user creates a new document library from either addanapp.aspx page or through a Modern Page, since that doesn’t use our content types or site columns.
In the old days, we were using classic, so it was easy to remove the OOTB document library from the addanapp.aspx page and replace it with our own STP template.
I’ve been reading about the ECM Document Library core, event receivers and possibly even CSOM to achieve what I’m looking to do, but not sure which is the best method to adopt here and how I go about implementing it.
Ideally, the outcome I'm looking to achieve is I want any new document library a user creates from a Modern Team Site to use only our custom content types and site columns, not the default OOTB ones.
Any ideas on how I go about achieving this at all please?