문제

Is there any way to get the custom modern theme being used by a site collection? I'm trying to reproduce a bunch of site collections and I'd rather not have to do this by hand.

There is an ApplyTheme method but no get theme? ThemeInfo only seems to be classic themes.

도움이 되었습니까?

해결책

I would suggest to check out the property

Web.ThemedCssFolderUrl

When a site's theme has been customized, a new folder will be generated and stored under _catalogs/theme/Themed/XXX and this property contains the reference to to it.

If I'm not mistaken this stands true for both classic and modern themes.

You should be able to get and set this properly rather than ApplyTheme() which could potentially generate unwanted instances of the same theme.

More on this here,

https://sharepoint.uservoice.com/forums/329214-sites-and-collaboration/suggestions/12298962-make-the-themedcssfolderurl-property-of-the-web-ob

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top