How to Use Collections in Kontent
Tags: kenticokontent, headlesscms, headless
Published: 2021-04-26 15:27:46

---
title: How to Use Collections in Kontent
published: true
date: 2021-04-24 13:27:10 UTC
tags: kenticokontent, headlesscms, headless
canonical_url: https://www.mcbeev.com/how-to-use-collections-in-kontent
---


[Kentico Kontent](https://kontent.ai/?utm_source=mcbeev&utm_medium=mcbeevcom&utm_campaign=extended_trial) includes a fantastic feature for organizing and producing a content model / content inventory. This feature is called **[Collections](https://docs.kontent.ai/tutorials/manage-kontent/projects/set-up-collections)** in Kontent. It allows departments and teams to manage their content in logical groups, campaigns, global regions, enterprise business units, or any other way you can think of. Let's take a look at how to use Collections in Kontent and I'll explain why I think it adds value to any large content operation.

![Large Content Operations in Kontent](https://www.mcbeev.com/getmedia/5640cbb9-6507-4d4c-ab9e-60118533131c/Kontent-Collections-The-Issue.png?width=760&height=427)



### The Issue Collections in Kontent Solves

When it comes to organizing large content operations that have global regions or multiple product catalogs across many different websites, most content management systems have the ability to categorize content in a hierarchical way. That means a region or major product grouping can be setup as folders inside of folders to divide out say North American vs. European content items or Automotive vs Healthcare industry targeted products. This approach can work fine, but it starts to get more complicated the larger your solution becomes, and it starts tying your content tightly into that one project or instance of the website you may be building. 

This means that different content teams or editors that are based per location or business unit may need to all access the same "content tree" to be able to add, edit, or manage the content that they need. This starts to become interesting when you need different levels of permissions, or content approval workflow based on the different regions or product groupings. What if the North American team needs to have add and edit permissions but can't publish the content because the European team has the ultimate last say in what gets to the live website channel?  On top of that does that mean you have one project or installation of the CMS in the EU? Would be slow for the NA team to access it? These are all issues that a great headless cms like Kontent attacks with its Collections feature.



### The Setup of Collections

Getting started with Collections in Kontent it is pretty easy. As long as you have the feature available to your project (which is based on your [Kontent subscription](https://kontent.ai/pricing?utm_source=mcbeev&utm_medium=mcbeevcom&utm_campaign=extended_trial)). For the rest of this post I am assuming that you have access to Collections in your subscription. You begin by **logging into Kontent**, then **choose the project** you are working on, and select the **Project Settings** main navigation menu item in the app. Once inside of Project Settings you click on the **Collections**. One optional step is to check which **Environment** you are using in your Kontent Project. It's best to create this first in a non production environment.

![Kontent Project Settings for Collections](https://www.mcbeev.com/getmedia/2102c7d4-54c4-47fb-b128-bdbaf43a72e8/Kontent-Project-Settings-Collections.png)

You will notice that by default, there is already one Collection in your project. The system does this at the time of the initial project creation. It's what all newly created Content Types and Content Items will be assigned to, and you must have at least on Collection in your project marked as the Default Collection at all times.

![Kontent Default Collection](https://www.mcbeev.com/getmedia/002b61fa-14f6-47b6-9711-76191d72e354/Kontent-Default-Collection.png)

Create your first new Collection by clicking the very obvious **Create New Collection** button. Simply give it a new name and click save. You are now on your way, seriously that is all it takes to start using the feature. In my example, I want to actually model a large enterprise organization that sells products in different regions around the world. So I have created multiple Collections in my Kontent project that represent my organization's global regions that are broken out as my organization is shaped. I have set the North American (NA) collection to the Default collection by simply renaming the original "Default" Collection to "North America (NA)" as it's new name. The results of my Collections are show below.

![Kontent Collections](https://www.mcbeev.com/getmedia/cedc3ad8-c69d-40ae-96cc-6d1dab6bbecc/Kontent-Collections-695.png)

If you are not sure on how name or setup your collections, the Kontent docs have a few more examples of [how to divide up your project in Kontent](https://docs.kontent.ai/tutorials/set-up-kontent/set-up-your-project/collections#a-how-collections-make-your-work-easier).



### Using Collections from an Editor's Standpoint

Now that you have setup some Collections, let's talk about using them. From an Editor's standpoint you pretty much are always working in one Collection. With Collections enabled the main Content Inventory screen will show you your content items with a new column of Collection. This allows editors to see at all times which Collection the content is stored within.

As you can see below, my organization has different Content Items, the various chairs, of the Content Type, Product, that I am now representing in the different Collections of NA, EU, LATAM, MEA and APAC.

![Kontent Content Inventory](https://www.mcbeev.com/getmedia/8f619341-78ab-45ef-b0c6-a16970975bfd/Kontent-Content-Inventory.png)

The filter system of the Kontent UI now has a new facet of filter by Collection that allows you to narrow down your content into the Collection that you want to work on. Below I am showing an example of filtering by the Content Type of Product and Collection of North American (NA).

![Kentico Kontent Content Inventory Filter by Collection](https://www.mcbeev.com/getmedia/c0bb281f-6ecb-4f54-8157-f049d7a9500e/Kontent-Content-Inventory-Collection.png)

If you are a seasoned Kontent user, you may notice that I am actually using a Saved Filter of the Content Inventory screen to remember my filter choices. You can see this again in the screen shot above for where I have "Globo NA Product View" selected under the Your saved filters area near the top of the screen. This saved filter saves me the time and effort of constantly clicking the filter choices if I bounce between screens in the Kontent app (which I do all the time!).

> **Pro Tip:** [Share your Saved Filters!](https://docs.kontent.ai/tutorials/write-and-collaborate/get-right-people-on-right-content/find-your-content#a-saving-a-filter) You can share your saved filters with other editors to save them time as well. This feature is pretty killer when you combine it with Collections and have multiple team members working on the same content.

The second aspect of working with Collections is creating Content Items. Click on the Create New button to create a new Content Item and you can see the screen changes to ask you what Collection you would like to create the new Content Item in.

![Kontent-Content Item Create in Collection](https://www.mcbeev.com/getmedia/3b3f83a9-c188-40ee-86a3-968329f90fb9/Kontent-Content-Item-Create-in-Collection.png)

After that choice the normal create Content Item process continues to ask you which type of item you would like to create and the system behaves normally from there. 

The last set of differences is around the security of working with content in Collections. When it comes to users and roles, the system shines. Now we can divide up our other team members into all of the Collections on the project, or lock them down to just a single Collection. Here I am giving my good friend and fellow Kontent MVP, [Michael Kinkaid](https://twitter.com/meandmyrobot) access to any Collection in the project. I could actually designate a different role in the NA collection vs. the EU collection if I want to as well. Which is very fitting for Michael as he splits his time between Canada and Ireland... or at least he used to before this whole global pandemic thing. If you are reading the Michael: Cheers mate!

![Kontent Roles in Collection](https://www.mcbeev.com/getmedia/4dfb87d3-dde0-4aa1-b091-81a8f878659e/Kontent-Roles-in-Collection.png)



### Using Collections from a Developer's Standpoint

For those in my techincal audience I'm sure you are interested in how to inject content from the Delivery or Preview APIs that use Collections in your apps. Well it's very simple. Nothing much changes in your code and that is a benefit in my opinion. There is simply a new System filter that you use to pass in the code name of the Collection into the API call. 

Even though it sounds simple, it actually took me a second or two to figure out how to do this though. The documentation explains what to do, but doesn't actually show the full example. So I'm going to show it here. The key is to use the**system.collection** querystring parameterif you are using the REST API or **EqualsFilter** if you are in C# land via the .NET Kontent Delivery SDK.

> https://deliver.kontent.ai/<project id>/items?system.type=product&**system.collection**=europe__eu_

This will get you a nice result set of your content. In my example from up above it gets me this:

![Kontent DeliveryAPI Collection GetItems](https://www.mcbeev.com/getmedia/90a34c05-9c0c-46cd-b872-558412404c35/Kontent-DeliveryAPI-Collection-GetItems.png)

The value of the system.collection is from the **codename** of the Collection item itself in the UI.

![Kontent Collections Codename](https://www.mcbeev.com/getmedia/d19dad6e-e805-43a3-a38f-7953c04ef89c/Kontent-Collections-Codename.png)

Also below is a C# snippet of using the EqualsFilter.



### Watch Me and the Kontent Team Present

If you want to actually watch me demo and talk more on Collections and even hear from the Kontent team themselves on the subject, you can check out the recording of the last [North American Kontent User Group on Youtube at my channel](https://www.youtube.com/channel/UCy6XSB_tJGTnAWEfLv2EqcA) or embedded below:

{% youtube bxF3eTcGIVU%}



### What Collections Can't Yet Do

There is one large limitation of Collections that I feel is fair to bring up. That is the Asset management feature of Kontent, the storage, management, and delivery of images, files, and pdfs has no concept yet of Collections. There is still just the simple folders of Assets that Kontent gives you. I'm hoping that the Kontent team adds in the ability to segment out assets by Collections over time. There is a simple workaround to build more folder structures in the Asset manager, that mimic your Collections, but as you can tell, I'm not a huge fan of nested folders within folders for dealing with content or assets. 




### Conclusion

I hope that after reading this blog post you can tell that Collections in Kentico Kontent are a critical factor for success for large content operations. I recommend using them in your Kontent project. The feature is definitely more than just a folder. If you are already using them in your project, let me know on twitter at [@mcbeev](https://twitter.com/mcbeev).

![Kontent Collections Rad](https://www.mcbeev.com/getmedia/0d8aa14b-7024-44bb-a20a-6455cda55de6/Kontent-Collections-Rad.png)