SPUtility.GetLayoutsFolder method (SPSite)

SharePoint 2013

Returns the versioned layouts folder for the specified site collection.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static string GetLayoutsFolder(
	SPSite site
)

Parameters

site
Type: Microsoft.SharePoint.SPSite

The SPSite whose CompatibilityLevel is being used.

Return value

Type: System.String
The name of the versioned layouts folder for the site collection.

ExceptionCondition
ArgumentNullException

The site parameter is a null reference (Nothing in Visual Basic).

If site.CompatibilityLevel is greater than or equal to 15, GetLayoutsFolder(SPWeb) returns "_layouts/site.CompatibilityLevel". Otherwise, returns "_layouts".

Show: