@using Model.Website @if (isDisplayable) { @ChildContent } else {

Sorry, there's nothing at this address.

} @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); } }