public bool ExistingPagesBeginWith(Guid siteID, string sFolderPath) { string p1 = ("/" + sFolderPath.ToLowerInvariant() + "/").Replace("//", "/"); int i1 = GetPagesBeginingWith(siteID, p1).Count(); string p2 = ("/" + sFolderPath.ToLowerInvariant()).Replace("//", "/"); int i2 = GetPagesEquals(siteID, p2).Count(); return (i1 + i2) > 0; }
protected bool FoldersAreValid() { string sFolderPath = this.Blog_FolderPath ?? String.Empty; if (SiteData.CurretSiteExists) { using (ContentPageHelper pageHelper = new ContentPageHelper()) { var exists = pageHelper.ExistingPagesBeginWith(this); return !exists; } } else { return true; } return false; }