public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesForum || !context.LoadSetting <ForumSettings>().ForumsEnabled) { return(null); } return(new ForumXmlSitemapResult(context, this, _urlHelper.Value, _urlRecordService.Value)); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { var query = _db.Products .AsNoTracking() .ApplyStoreFilter(context.RequestStoreId); return(new ProductXmlSitemapResult { DbContext = _db, Query = query, Context = context }); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesNews || !context.LoadSetting <NewsSettings>().Enabled) { return(null); } var query = GetAllNews(context.RequestStoreId, 0, int.MaxValue).SourceQuery; return(new NewsXmlSitemapResult { Query = query }); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesCategories) { return(null); } var query = BuildCategoriesQuery(showHidden: false, storeId: context.RequestStoreId); return(new CategoryXmlSitemapResult { Query = query }); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesManufacturers) { return(null); } var query = GetManufacturers(false, context.RequestStoreId).OrderBy(x => x.DisplayOrder).ThenBy(x => x.Name); return(new ManufacturerXmlSitemapResult { Query = query }); }
public ForumXmlSitemapResult( XmlSitemapBuildContext context, IForumService forumService, UrlHelper urlHelper, IUrlRecordService urlRecordService) { _forumService = forumService; _context = context; _urlHelper = urlHelper; _urlRecordService = urlRecordService; _groups = _forumService.GetAllForumGroups(context.RequestStoreId, false); _forums = _groups.SelectMany(x => x.Forums).ToList(); _topicsQuery = _forumService.GetAllTopics(0, 0, int.MaxValue, false).SourceQuery; }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesTopics) { return(null); } var query = GetAllTopics(context.RequestStoreId).AlterQuery(q => { return(q.Where(t => t.IncludeInSitemap && !t.RenderAsWidget)); }).SourceQuery; return(new TopicXmlSitemapResult { Query = query }); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSettings <SeoSettings>().XmlSitemapIncludesTopics) { return(null); } var customerRolesIds = _workContext.CurrentCustomer.GetRoleIds(); var query = _db.Topics .AsNoTracking() .ApplyStandardFilter(false, customerRolesIds, context.RequestStoreId); return(new TopicXmlSitemapResult { Query = query }); }
public XmlSitemapProvider PublishXmlSitemap(XmlSitemapBuildContext context) { if (!context.LoadSetting <SeoSettings>().XmlSitemapIncludesProducts) { return(null); } var searchQuery = new CatalogSearchQuery() .VisibleOnly(_services.WorkContext.CurrentCustomer) .WithVisibility(ProductVisibility.Full) .HasStoreId(context.RequestStoreId); var query = PrepareQuery(searchQuery); return(new ProductXmlSitemapResult { Query = query, Context = context }); }