oqtane.framework/Oqtane.Client/Shared/PaneLayout.razor
2019-08-20 16:43:35 -04:00

28 lines
644 B
Plaintext

@using System
@using Oqtane.Shared
@DynamicComponent
@code {
[CascadingParameter]
protected PageState PageState { get; set; }
RenderFragment DynamicComponent { get; set; }
protected override void OnInitialized()
{
DynamicComponent = builder =>
{
Type layoutType = Type.GetType(PageState.Page.LayoutType);
if (layoutType != null)
{
builder.OpenComponent(0, layoutType);
builder.CloseComponent();
}
else
{
// layout does not exist with type specified
}
};
}
}