private INavigationLink CreateNavigationLink(TemplatedBasePageType page) { string name = page.Name; bool isOverlay = false; IHasPageTitle pageWithTitle = page as IHasPageTitle; if (pageWithTitle != null) { name = pageWithTitle.PageTitle; } //overlay setting IHasOverlaySetting pageWithOverlay = page as IHasOverlaySetting; if (pageWithOverlay != null) { isOverlay = pageWithOverlay.IsOverlayInNavigation; } NavigationLink link = new NavigationLink() { Name = name, Url = new Url(this._urlResolver.GetUrl(page.PageLink)).Uri, NewWindow = false, IsOverlayOn = isOverlay }; return(link); }
private INavigationLink CreateNavigationLink(string name, PageData page) { Uri uri = new Url(page.PageLink.ToString()).Uri; NavigationLink link = new NavigationLink() { Name = name, Url = uri, NewWindow = false, }; if (page is IHasOverlaySetting) { IHasOverlaySetting overlayPage = page as IHasOverlaySetting; link.IsOverlayOn = overlayPage.IsOverlayInNavigation; } return(link); }