From 8c6c4aebc1a745f3948ad51903c81ce8de0f2dcf Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Tue, 28 May 2024 11:27:44 +0330 Subject: [PATCH] fix(sitemap) -Fix BlogCategory loc in site map --- Netina.Core/BaseServices/SiteMapService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Netina.Core/BaseServices/SiteMapService.cs b/Netina.Core/BaseServices/SiteMapService.cs index 7b129d3..8100722 100644 --- a/Netina.Core/BaseServices/SiteMapService.cs +++ b/Netina.Core/BaseServices/SiteMapService.cs @@ -107,7 +107,7 @@ public class SiteMapService : ISiteMapService await CreateCategoriesSiteMapsAsync(); await CreateProductsSiteMapsAsync(); await CreateBlogsSiteMapsAsync(); - await CreateBrandsSiteMapsAsync(); + //await CreateBrandsSiteMapsAsync(); await CreateBlogCategoriesSiteMapsAsync(); await CreatePagesSiteMapsAsync(); @@ -180,7 +180,7 @@ public class SiteMapService : ISiteMapService } } - private async Task CreateBrandsSiteMapsAsync() + private async Task CreateBrandsSiteMapsAsync() { var siteMapsUId = SiteMapUIds.Brands; @@ -564,7 +564,7 @@ public class SiteMapService : ISiteMapService root.AppendChild(urlElement); XmlElement loc = doc.CreateElement("loc", doc.DocumentElement?.NamespaceURI); - loc.InnerText = Path.Combine($"{_siteSetting.WebSiteUrl}/blogs/{blogCategory.Id}/{blogCategory.Slug}"); + loc.InnerText = Path.Combine($"{_siteSetting.WebSiteUrl}/blogs?blogCategoryId={blogCategory.Id}"); urlElement.AppendChild(loc); XmlElement lastmod = doc.CreateElement("lastmod", doc.DocumentElement?.NamespaceURI);