How to deploy display templates with pnp?
-
19-01-2021 - |
Вопрос
On SP 2016 on-prem I am trying to write a console application to upload files, mainly display templates.
I create a dummy site collection, and upload display template in "_catalogs/display templates/myfolder", and try to extract out the xml in order to be able to add dislpay templates programatically by using the command for apply template.
I tried this for extracting the schema:
Get-PnPProvisioningTemplate -Out C:\temp\pnptest\nytest.xml -Handlers Files
and this
Get-PnPProvisioningTemplate -Out C:\temp\pnptest\nytest.xml -Handlers All
None of these seems to work for giving me the schema xml for provisioning display templates. Actually I can not find anything related to my display templates in the xml. How can I upload display templates by using pnp ? Please advice.
Решение
I did some research on this and it seems it is not yet included in PnP Powershell. The suggestion was raised, but no inclusion in pnp-powershell till date for supporting display templates.
So, answer to your question is: Please try SharePoint powershell cmdlets for migrating your custom display templates. Here is a very good blog for uploading the display templates using powershell
Cheers!