# Modifying the Sitemap for a channel programmatically

**URL:** <https://community.bloomreach.com/t/modifying-the-sitemap-for-a-channel-programmatically/4361>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [April 12, 2024, 7:27pm UTC](https://community.bloomreach.com/t/modifying-the-sitemap-for-a-channel-programmatically/4361 "2024-04-12T19:27:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkjp2011](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/mkjp2011/32/1102_2.png) [@mkjp2011](https://community.bloomreach.com/u/mkjp2011)\
**Post date:** [April 12, 2024, 7:27pm UTC](https://community.bloomreach.com/t/modifying-the-sitemap-for-a-channel-programmatically/4361/1 "2024-04-12T19:27:46Z")

</div>

Is it possible to override the process that lists out the pages in the experience manager preview/editor? I want to conditionally render specific sitemap items based on some configurations we are adding such as if we have local experience pages within the site’s content folder, then we render the item, otherwise we hide it.

We currently have a sitemap item handler that we use to default relative content paths. I have tried to leverage that to set the isHiddenInChannelManager() function for the item, but the sitemap is loaded and displayed before ever calling the handler. And that seems to work outside of the context of the experience manager view.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 15, 2024, 8:20am UTC](https://community.bloomreach.com/t/modifying-the-sitemap-for-a-channel-programmatically/4361/2 "2024-04-15T08:20:34Z")

</div>

I’m not quite sure I understand the usecase, but instinctively I would say this is either not possible or not worth the effort. Perhaps you could explain a bit more what you are trying to achieve?
