Is there a way to find out what Page Layout and / or template a Sub-Site or it's publishing pages are using? Something in the Site Settings or the Library Settings?
2 Answers
For Publishing pages, you can find the name of page layouts Page Layouts column provided in Pages library. Perhaps, if you can't see that column in view, you can add that column in view by editing the view. Click on the page layout name will open that page layout in browser tab. Please see the below attached image for the same:
To check the base Site Template to be used to create your subsite, PowerShell commands is the easiest way. Execute below commands to get the site template name:
$web = Get-SPWeb "http://<server-name>/abc"
write-host "Web Template:" $web.WebTemplate " | Web Template ID:" $web.WebTemplateId
$web.Dispose()
Hope this will help you!
I assumed you are asking for SharePoint on-premise, however, it is applicable for SharePoint online as well.
This is the subsite creation template - once we go to the subsite creation page from the site content, we will get the below screen.
So, basically - it uses the parent site template hierarchy - I mean what are the templates are available for site collection, the same would be available for the subsite - however, SharePoint administrator can manage the template selection page in a subsite, like what are template should be available under the subsite creation.
Now, how do we get the site template details after creating the site?
Using the below PowerShell script, we can get the site template details for the specific given site.
$subWeb = Get-SPWeb http:/mysitecollection/subsite
$subWeb.WebTemplate + " " + $subWeb.WebTemplateId
$subWeb.close()
Now, if we want to get a list of sites and the site template in a web application, we can use the below script.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#Get All site collections
$SiteCollections = Get-SPWebApplication "http://sp" | Get-SPSite -Limit All
#Loop through all site collections
foreach($Site in $SiteCollections)
{
#Loop throuh all Sub Sites
foreach($Web in $Site.AllWebs)
{
Write-Host $web.title ": " $web.URL " Tmplate: " $web.WebTemplate
}
Write-Host ""
}
Script Source: