fix theme fallback to use Oqtane themeinfo resources
This commit is contained in:
@ -364,17 +364,15 @@
|
||||
page.ThemeType = site.DefaultThemeType;
|
||||
}
|
||||
var theme = site.Themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == page.ThemeType));
|
||||
Type themetype = Type.GetType(page.ThemeType);
|
||||
if (themetype == null || theme == null)
|
||||
if (theme == null)
|
||||
{
|
||||
// fallback to default Oqtane theme
|
||||
page.ThemeType = Constants.DefaultTheme;
|
||||
themetype = Type.GetType(Constants.DefaultTheme);
|
||||
theme = site.Themes.FirstOrDefault(item => item.Themes.Any(item => item.TypeName == page.ThemeType));
|
||||
}
|
||||
|
||||
Type themetype = Type.GetType(page.ThemeType);
|
||||
string panes = "";
|
||||
if (themetype != null && theme != null)
|
||||
if (themetype != null)
|
||||
{
|
||||
// get resources for theme (ITheme)
|
||||
page.Resources = ManagePageResources(page.Resources, theme.Resources, ResourceLevel.Page, alias, "Themes", Utilities.GetTypeName(theme.ThemeName));
|
||||
|
Reference in New Issue
Block a user