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

@ -27,18 +27,13 @@
DynamicComponent = builder =>
{
Type containerType = Type.GetType(container);
if (containerType != null)
if (containerType == null)
{
builder.OpenComponent(0, containerType);
builder.CloseComponent();
}
else
{
// container does not exist with type specified
builder.OpenComponent(0, Type.GetType(Constants.ModuleMessageComponent));
builder.AddAttribute(1, "Message", "Error Loading Module Container " + container);
builder.CloseComponent();
// fallback
containerType = Type.GetType(Constants.DefaultContainer);
}
builder.OpenComponent(0, containerType);
builder.CloseComponent();
};
}
}