1. Version: 4.1 2. Expected behavior: Blogposts included in sitemap. 3. Actual behavior: Blogposts are not included in sitemap. 4. Steps to reproduce the problem: no steps ;) Or just check your sitemap and try find blogposts there. 5. Any private modifications you made to your nopCommerce: We use RichBlog plugin from Nop-templates, but don't know is there any changes.
Hi! Andrei, could you show me where? Maybe you add this in 4.2? I write about ver 4.1
In Blog settings I have only: - Blog enabled - how much posts i want to show - tags cloud - Rss
And Blog comments. Nothing more.
In content managment / blog post i Have title long / short description / tags / comments, and that's all. In SEO tab standard keywords / meta / meta title / seo name
I also tried in all settings in search "sitemap" all i have set on True.
In Admin General Common also i have all included (categories/manufacturers / products / product tags, but don't have nothing about Blog post.
Yes sitemapsettings.sitemapincludeblogposts is only in v4.2 You would need to customise to add the blogposts in v4.1 Or as you use the RichBlog maybe the developer can do something for you ?
You need to edit v4.2\src\Presentation\Nop.Web\Factories\CommonModelFactory.cs public virtual SitemapModel PrepareSitemapModel(SitemapPageModel pageModel) Add in the code from v4.2
//blog posts if (_sitemapSettings.SitemapIncludeBlogPosts && _blogSettings.Enabled) { var blogPostsGroupTitle = _localizationService.GetResource("Sitemap.BlogPosts"); var blogPosts = _blogService.GetAllBlogPosts(storeId: _storeContext.CurrentStore.Id) .Where(p => p.IncludeInSitemap);
model.Items.AddRange(blogPosts.Select(post => new SitemapModel.SitemapItemModel { GroupTitle = blogPostsGroupTitle, Name = post.Title, Url = urlHelper.RouteUrl("BlogPost", new { SeName = _urlRecordService.GetSeName(post) }) })); }