Exclude a category or a product from the sitemap

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hello,
It would be handy to be able to exclude a category or a product from the sitemap web page and the sitemap xml feed.
For instance, some categories might just be used for newsletters' landing page or for a particular discount management.
Best regards.
10 years ago
Its not the best way but you can do sth like that:

1. Set the category MetaKeywords like: "..., ..., NOSITEMAP"
2. Change in CommonController Line 540

form
model.Categories = categories.Select(x => x.ToModel()).ToList();

to
model.Categories = categories.Select(x => x.ToModel()).Where(y => !y.MetaKeywords.Contains("NOSITEMAP")).ToList();

Now all Categories with "NOSITEMAP" are filltered out.

!!!NOT TESTED!!!
10 years ago
Thank you. But to do this kind of modification, we'd better do it properly by adding a field ;)
The idea of ​​my post was to propose a new feature if the NC team is interested.
10 years ago
ah ok...understand...is better to add it with new release and then with a new field in db.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.