Can we exclude specific sitemap item from link rewriting?

Hi All,

I have a scenario where, I need to exclude specific sitemap from “any”.
Is it possible ?

Scenario:
I have sitemap called content and one more sitemapitem as “any” under content.
any has relativecontentpath as ${1}

Case 1: localhost:8080/site/channel/content/herobanner – this should be displayed
Case 2: localhost:8080/site/channel/content/samplemessage – don’t want this to be displayed.

Thanks,
Yeshwanth.

Hey Yeshwanth,

There’s a boolean “hst:excludedforlinkrewriting” property for sitemap items. Never used it but it’s probably what you are looking for

Hi @bcanvural,

I think this property will exclude all the items which falls under any
But in my case, If I have 10 URL’s under any, want to exclude only 1, remaining 9 should work.

Thanks,
Yeshwanth.

then you probably want to look at this: https://documentation.bloomreach.com/14/library/concepts/links-and-urls/customize-link-processing.html

try to create explicite sitemaps for those items:

any
samplemessage (hst:excludedforlinkrewriting)
someother-speciallink (hst:excludedforlinkrewriting)

Thank you for your inputs @machak
This didn’t work !!
The issue is I don’t have a page on Bloomreach application, but am still trying to cache purge this document whenever modified using custom code.
When am trying to add sample-message as sitemap item or because of “any” sitemap item, it considers as sitemap and returns the URL for cache purge, which is not present and it fails.

Thanks,
Yeshwanth.