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:

Regex Email validation in c# dot net core

 Use this regex /^_?[a-zA-Z0-9]([a-zA-Z0-9]*[._+-])*[a-zA-Z0-9_]+@(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.[A-...