Пример #1
0
        public HttpResponseMessage GetThemes()
        {
            var themes = _themesController.GetLayouts(PortalSettings, ThemeLevel.Global | ThemeLevel.Site);
            var defaultPortalThemeName = GetDefaultPortalTheme();
            var defaultPortalLayout    = _defaultPortalThemeController.GetDefaultPortalLayout();
            var defaultPortalContainer = _defaultPortalThemeController.GetDefaultPortalContainer();

            return(Request.CreateResponse(HttpStatusCode.OK, new
            {
                themes,
                defaultPortalThemeName,
                defaultPortalLayout,
                defaultPortalContainer
            }));
        }
Пример #2
0
        private string GetSkinSrc(PageSettings pageSettings)
        {
            var defaultSkin = _defaultPortalThemeController.GetDefaultPortalLayout();

            if (pageSettings.SkinSrc != null &&
                pageSettings.SkinSrc.Equals(defaultSkin,
                                            StringComparison.InvariantCultureIgnoreCase))
            {
                return(null);
            }
            return(pageSettings.SkinSrc);
        }