Repository navigation
Provisioning SharePoint pages - handle embedded resources? #1886
|
Today, when using template provisioning to copy/clone one or multiple SharePoint pages to a different SharePoint Site, the extracted pages only include images and resources that are from the stock images. As no embedded assets are copied along with the template, if any embedded image/document are located in Site Assets, Shared documents or any other list local to the source SharePoint site , then a page created by that template will display broken resources in the content. Are there any thoughts about including assets in the template provisioning process? Anyone that have an example of how to handle resources in page templates? Best regards |
Replies: 2 comments
|
By default template exports do not include site content resources, libs, list, files, items. But you may include them in the template upon export or add them to the template. |
|
Follow-up: If the provisioning template has PersistAssetFiles = true, an object has to be passed in FileConnector property of the ExtractConfiguration. But before that, I think SharePointConnector is the implemented class which reads the full asset/file before handing over the data to the FileConnector object for storage? That class seems to read the whole file/list item into a MemoryStream in its method GetFileFromStorageAsync? Did I find the right implementation for the extraction part of the resource handling parts? Best regards |
By default template exports do not include site content resources, libs, list, files, items. But you may include them in the template upon export or add them to the template.
PnP PowerShell expose separate commands for those exports.
If you try out the PnP.Core.Provisioning console sample app the UI ask you about the lists and pages and items you want to include, I suggest you strat using that sample and checking the code of it to get a basic feeling how it works
https://pnp.github.io/pnpcore/demos/Demo.Console.Provisioning/README.html