---
title: "Example: syndication entry categories"
slug: "example--syndication-entry-categories"
abstract: "Example showing how to use the Syndication API to associate multiple topic categories with each syndication entry."
---
# Example: syndication entry categories

You can use the RSS format to associate multiple topic categories with each syndication entry. You can manage a list of categories as a folder containing category definition items.

You can add a selection field to each of the data templates for syndicated items to allow the CMS user to select any number of category definition items. You can include the categories in each syndication entry by populating the `System.ServiceModel.Syndication.SyndicationItem.Categories` list with the names of the category definition items.

You can implement a custom feed based on the following example that includes categories for syndication entries.

1. In the Visual Studio Web application project, add a class based on the following example:

    ```csharp
    namespace Sitecore.Sharedsource.Syndication {

    	using System.ServiceModel.Syndication;

    	public class CategorizedFeed: Sitecore.Syndication.PublicFeed

    	{
    		protected override SyndicationItem RenderItem(Sitecore.Data.Items.Item item) {
    			Sitecore.Diagnostics.Assert.ArgumentNotNull(item, "item");
    			SyndicationItem entry = base.RenderItem(item);
    			Sitecore.Data.Fields.MultilistField entries = item.Fields["Categories"];
    			if (entries != null) {
    				foreach(Sitecore.Data.Items.Item category in entries.GetItems()) {
    					if (category != null) {
    						entry.Categories.Add(new SyndicationCategory(category.Name));
    					}
    				}
    			}
    			return entry;
    		}
    	}
    }
    ```

2. In the **Content Editor**, in the feed definition item, in the **Extensibility** section, in the **Type** field, enter the signature of the .NET type. For example: `Sitecore.Sharedsource.Syndication.CategorizedFeed, Assembly`
3. In the **Content Editor**, create a folder containing category definition items.
4. In the **Template Manager** or the **Content Editor**, in the data template(s) used for syndication entries, add a selection field named **Categories**, and then set the **Source** property of the **Categories** field to the folder containing category definition items that you created in the previous step.
5. In the **Content Editor**, in the syndication entries, in the **Categories** field, select the relevant categories.

> [!tip]
> Create a data template containing the `Categories` field, and add that data template as a base template for templates that support syndication.