예제 #1
0
 public SettingsController(ISettingService settingService,
     IPermissionService permissionService,
     IThemeProvider themeProvider,
     CatalogSettings catalogSettings,
     WebInformationSettings webInformationSettings,
     SeoSettings seoSettings,
     AnalysisNSocialNetworkSettings analysisNSocialNetworkSettings)
 {
     _permissionService = permissionService;
     _settingService = settingService;
     _themeProvider = themeProvider;
     _catalogSettings = catalogSettings;
     _webInformationSettings = webInformationSettings;
     _analysisNSocialNetworkSettings = analysisNSocialNetworkSettings;
     _seoSettings = seoSettings;
 }
예제 #2
0
        public ActionResult Seo(SeoSettingsModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageSettings))
                return AccessDeniedView();

            var entity = new SeoSettings
            {
                CanonicalUrlsEnabled = model.CanonicalUrlsEnabled,
                DefaultMetaDescription = model.DefaultMetaDescription,
                DefaultMetaKeywords = model.DefaultMetaKeywords,
                DefaultTitle = model.DefaultTitle,
                PageTitleSeoAdjustment = model.PageTitleSeoAdjustment,
                PageTitleSeparator = model.PageTitleSeparator
            };

            _settingService.SaveSetting(entity);

            return RedirectToAction("Seo");
        }