Forum Discussion
Jess Lassen
Oct 29, 2016Copper Contributor
apply pnp template on sub site
Hi, I extracted a .pnp template from a sub site (publishing) and then tried to apply that .pnp template to a newly created sub site (publishing) but I could not do this, when I try to apply from ...
- DeletedOct 31, 2016
Hi,
it seems the pages are not in the current directory. My pnp:files look like this
<pnp:File src="SiteAssets\Logo.png" Folder="SiteAssets" Overwrite="true" />
where src could be C:\temp\sitesassets\logo.png
so whitout properties
but also do you need to provision the masterpages? If they are already in there why would you like to upload your version?
hope it helps.
Jess Lassen
Oct 31, 2016Copper Contributor
Thanks for your reply, my template works if I remove the whole Files section from the xml. But if I need to provision the files what should I do? Can you please let me know?
Thanks for your help
Thanks for your help
Deleted
Oct 31, 2016Hi,
it seems the pages are not in the current directory. My pnp:files look like this
<pnp:File src="SiteAssets\Logo.png" Folder="SiteAssets" Overwrite="true" />
where src could be C:\temp\sitesassets\logo.png
so whitout properties
but also do you need to provision the masterpages? If they are already in there why would you like to upload your version?
hope it helps.
- DeletedNov 01, 2016
Hi Jess,
please make sure youre files are in the correct directory aka the bin directory where your console is running.
kr,
Paul
- Jess LassenNov 01, 2016Copper Contributor
Deleted one thing, I told you it works, but it only works from PowerShell but not from C# console application, can you give any clue? By the way, this time I am using .pnp template.
Thanks
- Jess LassenNov 01, 2016Copper ContributorThanks a lot for your help. When I modified file src from "default.aspx" to "Pages\default.aspx" it worked! I don't know why provisioning engine does not giving the correct path for file src. May be I am extracting template from sub site, that's why.
Anyway, thanks for the big help.