public static bool GetConverBlankSpacesIntoHyphen(this Web publishingWeb) { var value = ConvertUtils.ToString(PageLayoutAndSiteTemplateSettingsModelHandler.GetPropertyBagValue(publishingWeb, "__AllowSpacesInNewPageName")); if (string.IsNullOrEmpty(value)) { return(false); } return(ConvertUtils.ToBool(value).Value); }
public static bool GetInheritingAvailablePageLayouts(this Web web) { var value = ConvertUtils.ToString(PageLayoutAndSiteTemplateSettingsModelHandler.GetPropertyBagValue(web, "__PageLayouts")); if (string.IsNullOrEmpty(value)) { return(false); } return(value.ToUpper() == "__inherit".ToUpper()); }
public static bool GetIsAllowingAllPageLayouts(this Web web) { var value = ConvertUtils.ToString(PageLayoutAndSiteTemplateSettingsModelHandler.GetPropertyBagValue(web, "__PageLayouts")); if (string.IsNullOrEmpty(value)) { return(true); } return(false); }
public static string GetDefaultPageLayoutName(this Web web, IEnumerable <ListItem> pageLayouts) { var value = ConvertUtils.ToString(PageLayoutAndSiteTemplateSettingsModelHandler.GetPropertyBagValue(web, "__DefaultPageLayout")); var pageNameItem = GetPageLyoutNameFromXml(value); if (pageNameItem != null) { var pageLayoutUniqueId = pageNameItem.UniqueId; return(GetLayoutFileNameByUniqueId(pageLayouts, pageLayoutUniqueId)); } return(string.Empty); }
public static List <PageLayoutXmlItem> GetAvailablePageLayoutNames(this Web web, IEnumerable <ListItem> pageLayouts) { var value = ConvertUtils.ToString(PageLayoutAndSiteTemplateSettingsModelHandler.GetPropertyBagValue(web, "__PageLayouts")); var pageNameItems = GetPageLyoutNamesFromXml(value); foreach (var pageItem in pageNameItems) { var pageLayoutUniqueId = pageItem.UniqueId; pageItem.Name = GetLayoutFileNameByUniqueId(pageLayouts, pageLayoutUniqueId); } return(pageNameItems); }