Added support for friendly names and thumbnails in theme, layout, and container components. Added fallback support during loading for themes, layout, and containers.

This commit is contained in:
Shaun Walker
2020-06-01 14:58:46 -04:00
parent f45cb8b069
commit 1b7ca45d4a
26 changed files with 222 additions and 200 deletions

View File

@ -66,18 +66,13 @@
DynamicComponent = builder =>
{
var themeType = Type.GetType(PageState.Page.ThemeType);
if (themeType != null)
if (themeType == null)
{
builder.OpenComponent(0, themeType);
builder.CloseComponent();
}
else
{
// theme does not exist with type specified
builder.OpenComponent(0, Type.GetType(Constants.ModuleMessageComponent));
builder.AddAttribute(1, "Message", "Error Loading Page Theme " + PageState.Page.ThemeType);
builder.CloseComponent();
// fallback
themeType = Type.GetType(Constants.DefaultTheme);
}
builder.OpenComponent(0, themeType);
builder.CloseComponent();
};
}