SharePoint Online Composed Look inheritance
-
10-12-2020 - |
Question
I've manually created a Composed Look and have a problem that the Composed Look is not inherited to all subwebs.
If publishing is activated the Composed Look is inherited.
But for some sites that don't have it active the Composed Look is inherited and for some its not.
Does anyone know where/if there is a setting to "inherit Composed look from parent".
EDIT: Problem solved
Follow these steps:
- Activate Publishing Infrastructure Site Feature
- Go to: /_layouts/15/ChangeSiteMasterPage.aspx
- Reset inheritance for subwebs
- "OK"
Solution
In SharePoint online this functionality is moved to the master page settings page (Site Settings > Master Page) under the Theme section of that page. Check screenshot
You can also use the below powershell to push the update:
$url = "http://your-site"
$site = Get-SPSite -Identity $url
Write-Host "RootWeb Theme: " site.RootWeb.ThemedCssFolderUrl
foreach ($web in $site.AllWebs) {
Write-Host "Web Title: " $web.Title
Write-Host "Web Theme: " $web.ThemedCssFolderUrl
$web.ThemedCssFolderUrl = $site.RootWeb.ThemedCssFolderUrl
$web.Update()
$web.Dispose()
}
$site.Dispose();
OTHER TIPS
https://www.eliostruyf.com/sub-site-themecomposed-looks-inheritance-how-to/
In SharePoint 2013 this functionality is moved to the master page settings page (Site Settings > Master Page) under the Theme section of that page.
But what with non-publishing sites? These sites do not have this functionality. Unfortunately, the only way to set up theme inheritance is via code.
See the link above to see the code the guy built