Want to remove a specific url from default magento sitemap.xml
I don't want this url http://www.globekart.com/coupon-partners.html in the sitemap http://www.globekart.com/sitemap/sitemap.xml
Please help
magento-1.9sitemapsxml
Want to remove a specific url from default magento sitemap.xml
I don't want this url http://www.globekart.com/coupon-partners.html in the sitemap http://www.globekart.com/sitemap/sitemap.xml
Please help
Best Answer
Please do not just copy the complete file to
app/code/local
(as mentioned in the other answer here). This is not upgrade safe and will cause some extra work when upgrading.It's better to create a seperate module for this, for example
YourNamespache_Sitemap
with a proper rewrite of the modelMage_Sitemap_Model_Sitemap
there.In your
config.xml
put the following:And in
app/code/[local/community]/YourNamespace/Sitemap/Model
create the classSitemap.php
which extends the original sitemap model class. You only need to copy and adjust thegenerateXml()
method in there, the rest can stay in the parent class.