4

I'm using PnP

GetProvisioningTemplate()

method to create Provisioning Template from existing site(have some document libraries with folders and files) and applying to newly created sites, using PnP

ApplyProvisioningTemplate()

Its working fine interms of creation and applying themes, CSS etc.,But its not copying contents of document library. Is there any way can include the library contents on template(XML)file. I'm following Link from OfficeDev

  • Any Comments... – Arun Jun 24 '16 at 10:01
  • Do you have any relevant code? – Abbas Nov 29 '16 at 10:45
  • @Abbas Pls check the above mentioned link. It has sample code in GitHub which is downloadable... – Arun Jan 23 '17 at 6:12
1

To provision folders inside custom document library, use pnp:Directory, a sub node under pnp:Files.

    <pnp:Files>
       <pnp:Directory Src="StyleLibrary" Folder="{sitecollection}/Style 
       Library/" Overwrite="true" Level="Published" Recursive="false" 
       IncludedExtensions="*.*" ExcludedExtensions="" MetadataMappingFile="">
      </pnp:Directory>
    </pnp:Files>

src="StyleLibrary", StyleLibrary is the folder to be provisioned and is placed in the same folder that the provisioning console exe is placed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.