Automatically Reset Theme To Default, SharePoint 2010
Posted
by KunaalKapoor
on Geeks with Blogs
See other posts from Geeks with Blogs
or by KunaalKapoor
Published on Fri, 21 Sep 2012 20:03:38 GMT
Indexed on
2012/09/21
21:41 UTC
Read the original article
Hit count: 235
Manually/Through UI
On the top link bar, click Site Settings.
On the Site Management page, in the Customization section, click Apply theme to site.
On the Apply Theme to Web Site page, select No Theme(Default) from the list.
Click Apply.
Through Script
function Apply-SPDefaultTheme([string]$SiteUrl, [string]$webName)
{
$site = new-object Microsoft.SharePoint.SPSite($SiteUrl)
$web = $site.OpenWeb($webName)
$theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::RemoveThemeFromWeb($web,$false)
$web.Update()
$web.Dispose()
$site.Dispose()
}
After looking in the SPTHEMES.XML file found in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033 folder, you do see there is a theme with a theme name of "none". Since there is no "default" theme in 2010. So make sure if you wanna reset it to default you know that there is no default, you need to select 'none' :)
© Geeks with Blogs or respective owner