Content Hub Tip #29: What to know about M.Content.Repository?

 

Sitecore Content Hub Tip

Every now and you stumble across a piece of important information to understand. This time I want to tell you about the taxonomy within Content Hub called M.Content.Repository. It appears to be a simple list of taxonomy values. Here are the values in the taxonomy:
  • Chili
  • Content 
  • DRM 
  • Import 
  • KPI 
  • Packages 
  • Portal 
  • Print
  • Standard
  • Etc.
If you're experienced with Content Hub, you might recognize some names in the list. This taxonomy is actually fundamental when working with Assets within Content Hub. Based on the location where an Asset is inserted into the Content Hub, the taxonomy value for this may be different.

You might ask yourself, why is this important? If you use the UI, it probably is not. The UI will make sure that the Assets from the different repositories don't mix with others. That said if you're more of a developer like me, you will probably need to understand this. When working with assets you need to specify a Content repository.

So when do we need to specify a Content repository?
The first place you will probably encounter this is when configuring a Search component in Content Hub for M.Asset. Let us take the following example.

Search component without Content repository filter
If you look at the configured Search component, which Assets do you expect the search to show? If you think it will show only the assets uploaded by the users, you're mistaken. At first glance the result looks ok, you probably see assets that users have uploaded into the system. But if we add the facet M.Content.Repository to the page, we see that we've got assets from many different repositories.

Search result with all assets

When we activate the Portal repository facet filter we get a different result. We now only have assets that were shipped with the Content Hub. That's why it's important to always add at least a Content repository filter when working with assets.

Filtered result with Portal assets only


Let's take a look at how the Search component should have been configured. We always start with a definition filter and when working with M.Asset we always add the relation filter as well. Most of the time you only want to interact with the user-uploaded assets, they will be located in the Standard content repository.

Search component proper configuration

Now that you understand the importance of the Content repository, you need to know that this doesn't only work with Search components. It goes much further than that. You need to specify the filter also when you're creating the Security rules, when working with scripts, and creating integrations. Basically each time you're doing something with assets thing about which assets you need to work with and limit them to one or more repositories.

Which repositories do we have?
Here's the complete list of all values in M.Content.Repository taxonomy:
  • M.Content.Repository.Chili - Web-to-Print Module
  • M.Content.Repository.Content - CMP Module
  • M.Content.Repository.DRM
  • M.Content.Repository.Import
  • M.Content.Repository.KPI
  • M.Content.Repository.Packages
  • M.Content.Repository.Portal - Not applicable
  • M.Content.Repository.Portal.Avatar - Not applicable
  • M.Content.Repository.Print
  • M.Content.Repository.Processing
  • M.Content.Repository.Product - PCM Module
  • M.Content.Repository.Project - MRM Module
  • M.Content.Repository.Standard - DAM Module
  • M.Content.Repository.Subtitle - DAM Module
  • M.Content.Repository.Template - Not applicable
In the above list, I've also tried to match each value to a specific Content Hub module. I'm sorry to say, that I don't have all the answers. Drop me a message if you know more!

Hope this gives you more insight into working with assets.

Until next time!