public virtual ActionResult Create(SiteMapType type, int page, IEnumerable <string> siteMapCacheKeys, string siteMapUrlTemplate)
 {
     return(new XmlSiteMapResult(
                type,
                page,
                this.DefaultRootNode,
                siteMapCacheKeys,
                this.DefaultBaseUrl,
                siteMapUrlTemplate,
                this.siteMapLoader,
                this.urlPath,
                this.cultureContextFactory));
 }
 public virtual ActionResult Create(SiteMapType type, int page, ISiteMapNode rootNode)
 {
     return(new XmlSiteMapResult(
                type,
                page,
                rootNode,
                this.DefaultSiteMapCacheKeys,
                this.DefaultBaseUrl,
                this.DefaultSiteMapUrlTemplate,
                this.siteMapLoader,
                this.urlPath,
                this.cultureContextFactory));
 }
Esempio n. 3
0
        public tbl_Domains SaveDomain(string address, string name, string phone, string consumerKey, string consumerSecret, string css, string defaultDesc, string keywords,
                                      int langID, string title, string desc, string domainName, string email, string googleAnalytics, string googleAnalyticsCode, bool googleAnalyticsVisible,
                                      string robots, string headline, int homePageID, int?launchYear, bool primaryDomain, string share, string twitterSecret, string twitterToken, string twitterUser, bool updateTwitter,
                                      bool isMailChimpEnabled, string mailChimpAPIKey, string mailChimpListID, bool isCommuniGatorEnabled, string communiGatorUser, string communiGatorPassword,
                                      List <tbl_SettingsValue> settingsValues, bool IsPaypalPayment, bool IsSagePayPayment, bool IsSecureTradingPayment, EventViewType eventView, bool enableEventSale,
                                      bool enableProductSale, string theme, bool devMode, int domainID, bool isCoockieConsentEnabled, bool isStripePayment, List <tbl_Social> socialValues, bool customRouteHandler)
        {
            if (String.IsNullOrEmpty(domainName))
            {
                return(null);
            }

            var domain = DomainsRepository.SaveDomain(address, name, phone, consumerKey, consumerSecret,
                                                      css, defaultDesc, keywords, langID, title, desc, domainName, email, googleAnalytics, googleAnalyticsCode,
                                                      googleAnalyticsVisible, robots, headline, homePageID, launchYear, primaryDomain, share, twitterSecret,
                                                      twitterToken, twitterUser, updateTwitter, isMailChimpEnabled, mailChimpAPIKey, mailChimpListID,
                                                      isCommuniGatorEnabled, communiGatorUser, communiGatorPassword, eventView, enableEventSale,
                                                      enableProductSale, theme, devMode, isCoockieConsentEnabled, customRouteHandler, domainID);

            if (domain != null)
            {
                if (domainID == 0)
                {
                    foreach (var value in Enum.GetValues(typeof(SiteMapType)))
                    {
                        SiteMapType type = (SiteMapType)Enum.Parse(typeof(SiteMapType), value.ToString());

                        var sitemap = SitemapRepository.SaveSiteMap(string.Empty, 1, 0, domain.DomainID, String.Empty, false, false, type.ToString(), null,
                                                                    (decimal)0.5, String.Empty, FriendlyUrl.CreateFriendlyUrl(type.ToString()), true, false, ContentType.Content, type.ToString(), 0, 0, (int)type, true);

                        if (sitemap != null)
                        {
                            ContentRepository.SaveContent(String.Empty, String.Empty, type.ToString(), 0, string.Empty, type.ToString(), type.ToString(),
                                                          string.Empty, 0, string.Empty, string.Empty, string.Empty, type.ToString(), string.Empty, false, sitemap.SiteMapID, 0);
                        }
                    }

                    socialValues = this.GetDefaultSocialValues(domain.DomainID);
                }

                PaymentDomainRepository.UpdateStatus(IsPaypalPayment, PaymentType.PayPal, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(IsSagePayPayment, PaymentType.SagePay, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(IsSecureTradingPayment, PaymentType.SecureTrading, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(isStripePayment, PaymentType.Stripe, domain.DomainID);
                SettingsValuesRepository.Save(settingsValues, domain.DomainID);
                SocialRepository.SaveMultipleSocial(socialValues);
                return(domain);
            }

            return(null);
        }
        public XmlSiteMapResult(
            SiteMapType type,
            int page,
            ISiteMapNode rootNode,
            IEnumerable <string> siteMapCacheKeys,
            string baseUrl,
            string siteMapUrlTemplate,
            ISiteMapLoader siteMapLoader,
            IUrlPath urlPath,
            ICultureContextFactory cultureContextFactory)
        {
            if (siteMapLoader == null)
            {
                throw new ArgumentNullException("siteMapLoader");
            }
            if (urlPath == null)
            {
                throw new ArgumentNullException("urlPath");
            }
            if (cultureContextFactory == null)
            {
                throw new ArgumentNullException("cultureContextFactory");
            }

            this.MapType               = type;
            this.Ns                    = "http://www.sitemaps.org/schemas/sitemap/0.9";
            this.Vns                   = "http://www.google.com/schemas/sitemap-video/1.1";
            this.Page                  = page;
            this.RootNode              = rootNode;
            this.SiteMapCacheKeys      = siteMapCacheKeys;
            this.BaseUrl               = baseUrl;
            this.SiteMapUrlTemplate    = siteMapUrlTemplate;
            this.siteMapLoader         = siteMapLoader;
            this.urlPath               = urlPath;
            this.cultureContextFactory = cultureContextFactory;
        }
Esempio n. 5
0
 protected string GetURL(SiteMapType type, string relativeUrl)
 {
     return String.Format("/{0}{1}", this.Domain.DO_CustomRouteHandler ? string.Empty : WebContentService.GetSitemapUrlByType(SiteMapType.EventShop, this.DomainID).Trim('/'), relativeUrl);
 }
Esempio n. 6
0
 public string GetSitemapUrlByType(SiteMapType type, int domainID)
 {
     return(SitemapRepository.GetUrlByType((int)type, domainID) ?? type.ToString());
 }
Esempio n. 7
0
 public tbl_SiteMap GetSitemapByType(SiteMapType type, int domainID)
 {
     return(SitemapRepository.GetByType((int)type, domainID));
 }
Esempio n. 8
0
 public string GetSitemapUrlByType(SiteMapType type, int domainID)
 {
     return SitemapRepository.GetUrlByType((int)type, domainID) ?? type.ToString();
 }
Esempio n. 9
0
 public tbl_SiteMap GetSitemapByType(SiteMapType type, int domainID)
 {
     return SitemapRepository.GetByType((int)type, domainID);
 }
Esempio n. 10
0
 protected string GetURL(SiteMapType type, string relativeUrl)
 {
     return(String.Format("/{0}{1}", this.Domain.DO_CustomRouteHandler ? string.Empty : WebContentService.GetSitemapUrlByType(SiteMapType.EventShop, this.DomainID).Trim('/'), relativeUrl));
 }