This topic has not yet been rated - Rate this topic

ThmxTheme.SetThemeUrlForWeb Method (SPWeb, String, Boolean)

SharePoint 2010

Applies the theme pointed to by the specified URL to the specified web.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public static void SetThemeUrlForWeb(
	SPWeb web,
	string themeUrl,
	bool shareGenerated
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb
The web where the theme will be applied.
themeUrl
Type: System.String
The server-relative URL of the theme file.
shareGenerated
Type: System.Boolean
true if the generated Cascading Style Sheet (CSS) files are shared in the site collection; otherwise, false.

If the specified web had a theme previously applied to it and the theme was not shared, this operation will delete the theme.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ