add validation logic to ensure page theme martches site theme

This commit is contained in:
sbwalker
2023-06-23 07:38:33 -04:00
parent a7c5841e76
commit 6126624631
3 changed files with 15 additions and 3 deletions

View File

@ -355,7 +355,7 @@
// appearance
_title = _page.Title;
_themetype = _page.ThemeType;
if (string.IsNullOrEmpty(_themetype))
if (string.IsNullOrEmpty(_themetype) || ThemeService.GetTheme(PageState.Site.Themes, _themetype)?.ThemeName != ThemeService.GetTheme(PageState.Site.Themes, PageState.Site.DefaultThemeType)?.ThemeName)
{
_themetype = PageState.Site.DefaultThemeType;
}