Friday, August 12, 2016

Create new pages library in SharePoint 2013

You can save Pages library as a template with or without including the template but it won't be visible to create a new Pages library as SharePoint allows you to create only one Pages library on a site.

One alternative way to create another pages library is using powershell script detailed below:

$site = Get-SPSite http://site
$web = $site.OpenWeb("/")
$listTemplates = $site.GetCustomListTemplates($web)
$nonPublishingWeb = $site.OpenWeb("/TeamSite")

$nonPublishingWeb.Lists.Add("new list Instance name", "", $listTemplates["PagesTemplateName"]


No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...