SPUtility.ContextLayoutsFolder property

SharePoint 2013

Getsthe versioned layouts folder for the context site.

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

public static string ContextLayoutsFolder { get; }

Property value

Type: System.String
The string representing the versioned layouts folder.

For site.CompatibilityLevel greater than or equal to 15 (for example, "_layouts/15"), ContextLayoutsFolder returns "_layouts/site.CompatibilityLevel". Otherwise, the method returns "_layouts".

Show: