protected virtual string GetParentPageUrl(Guid parentPageId, int localeId, ParentUrlPageList pageList) { var result = ""; if (!parentPageId.Equals(Guid.Empty)) { var parentPage = pageList.Where(x => x.Id == parentPageId && x.LocaleId == localeId).FirstOrDefault(); if (parentPage != null) { if (!parentPage.IsUrlAbsolute) { result = JoinUrlSegments(GetParentPageUrl(parentPage.ParentId, localeId, pageList), parentPage.Url); } else { result = parentPage.Url; } } } return(result); }
protected virtual string GetParentPageUrl(Guid parentPageId, int localeId, ParentUrlPageList pageList) { var result = ""; if (!parentPageId.Equals(Guid.Empty)) { var parentPage = pageList.Where(x => x.Id == parentPageId && x.LocaleId == localeId).FirstOrDefault(); if (parentPage != null) { if (!parentPage.IsUrlAbsolute) { result = JoinUrlSegments(GetParentPageUrl(parentPage.ParentId, localeId, pageList), parentPage.Url); } else { result = parentPage.Url; } } } return result; }