You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
585 B
26 lines
585 B
@using Model.Website |
|
@if (isDisplayable) { |
|
@ChildContent |
|
} |
|
else { |
|
<LayoutView Layout="@typeof(MainLayout)"> |
|
<p>Sorry, there's nothing at this address.</p> |
|
</LayoutView> |
|
} |
|
|
|
@code { |
|
|
|
[Parameter] |
|
public RenderFragment ChildContent { get; set; } |
|
|
|
[Inject] |
|
public NavigationManager MyNavigationManager { get; set; } |
|
|
|
bool isDisplayable; |
|
|
|
protected override void OnInitialized() { |
|
var page = MyNavigationManager.Uri.Remove(0, MyNavigationManager.BaseUri.Length); |
|
isDisplayable = WebDeploymentModel.Get().Contains(page); |
|
} |
|
|
|
} |