Forum Discussion
Niclas Carlsson
Feb 13, 2017Brass Contributor
PnP PowerShell - PnP Provisioning package (pnp) with folders
Hi Is it possible to create a pnp provisioning file with a folder structure for a library by using Convert-PnPFolderToProvisioningTemplate or doesn't the current provisioning enging support pnp ...
Deleted
hi Nigel,
in my code i did a big one this is a extract of the template:
<def:ListConfiguration xmlns:def="http://tempuri.org/ListConfiguration"> <def:SiteUrl>{parameter:SiteCollectionUrl}</def:SiteUrl> <def:Lists> <def:List Url="COM"> <def:Folders> <def:Folder Title="Estimates"> <def:ObjectSecurity> <def:BreakRoleInheritance ClearSubscopes="false" CopyRoleAssignments="true"> <def:RoleAssignment Principal="Estimators" RoleDefinition="ContributeWithoutDelete"/> </def:BreakRoleInheritance> </def:ObjectSecurity> </def:Folder> </def:Folders> </def:List> </def:Lists> </def:ListConfiguration>
Nigel Price
Feb 22, 2017Iron Contributor
Hi Paul
@ErwinVanHunen's Blog says this is the call you make for the extension ->
public void ProcessRequest(ClientContext ctx, ProvisioningTemplate template, string configurationData)
Your code has this ->
private void CreateFolders(ClientContext context, Web web, List list, Project.Provisioning.Models.ListConfigurationListFolder[] folders)
So I presume I have to convert between the two.
I can get web from the clientcontext but for the list I need to have the list name. Where do I get that from ?
Thanks
Nigel