Is there a "scope to folder" or at least "default to folder" option for the content hub?

When I worked with Sitecore and was creating components that allowed you to select content from the content tree, you could specify a specific folder so that authors would be defaulted to only viewing/creating/consuming content from that folder. For example, if I have an Image widget that lets you pick an image from the content hub, I want to specify that the "select content item" picker defaults to ContentHubRoot/images/inline/my-inline-image.jpg.

I'd love the ability to "restrict" content for a widget to a specific folder, but I would settle for defaulting it. It's a quality of life improvement for authors to be sent right to the correct folder for that content item.

I have a feeling I'll have to create my own selector for this because it doesn't exist today as far as I could see.

I ran it through some AI to see if it found stuff in the docs, and it basically said that the challenge is on the UI side, as it wasn't sure if it exposed a property to preselect a folder. It said:

"This is where you hit the main uncertainty. The built-in Kentico.Administration.ContentItemSelector React component is not exposed through the public @kentico/xperience-admin-components npm package (I checked the type declarations). So you have two options:

Option A: Try passing ResolvedFolderGuid to the built-in component

Set ClientComponentName = "Kentico.Administration.ContentItemSelector" and include your ResolvedFolderGuid in the client properties. If the internal Kentico React component accepts an undocumented folder prop, this works with zero custom TSX. The downside is it's not in the public API — you'd need to verify by:

  1. Using browser DevTools on the existing selector to inspect what props the React component receives
  2. Or searching Kentico's community/GitHub for whether a folder initial-state prop exists

Option B: Custom React component (more work, fully controlled)

This is the reliable path but requires building a selector UI. In Client/src/form-components/FolderScopedItemSelector.tsx:"


Has anyone done this before? If this works out, I'd also like to add some functionality to create folders on the fly when creating an item, as I feel that's also a gap, but I'll focus on that later. First thing, I'd like to default the content hub folder for my authors.


Environment

  • Xperience by Kentico version: [31]

  • .NET version: [10]

  • Execution environment: [Azure]

Tags:
Content management Components Custom modules Developer tools

Answers

The Content Item Selector UI Form Component doesn't have these features at the moment. I recommend sharing your suggestion (link to this Q&A discussion) through our roadmap feedback.


Re: Why can't you access it in our npm packages?

Not all components in Xperience's admin UI are designed for extension and customization - this is one of them that has a strict API surface and isn't shipped in the @kentico/xperience-admin-components package.

This doesn't mean we won't ever make it available. Today we can make changes to the behavior and API surface of this React component as-needed, without considering breaking customer projects. If/when we make it available for extension this is no longer true.

Share your use-case in the roadmap feedback and that will help us understand the cost/benefit of making these types of advanced components available for extension.

Yeah I agree with this - or at least being able to restrict which content types go into which workspace in the Content Hub (which then respects the default in the selectors).

E.g. if an "image" content item can only be placed in a "Media Library" workspace in the Content Hub, then selectors configured for only this image content type, should default (or restrict?) to the Media Library workspace.

I made this open source repo that goes half way to achieving this.

To response this discussion, you have to login first.