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 ...
- AnonymousOct 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
Deleted I did not rename anything.
Please see the following screen shots what I did (all using power shell)
Extracted template from site
Applying template started
Template applying started
Applying template fails
Applying template fails
I am attaching the .xml template file
Thanks
Anonymous
Oct 31, 2016Hi,
looked at your template and what i would do narrow it down meaning remove parts of the xml like what happeens if all is commented out except time... etc..
furthermore i see this line:
<pnp:Property Key="PublishingPageLayout" Value="{sitecollection}/_catalogs/masterpage/wizdom2Column.aspx, https://xxxx.sharepoint.com/sites/rayhan{sitecollection}/_catalogs/masterpage/wizdom2Column.aspx" />
Wher you use a url and a sitecolleciton token in 1 url...
- Jess LassenOct 31, 2016Copper ContributorThanks 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- AnonymousOct 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 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