# Extend and customize the Content list widget

## Customize the widget designer

You can cutomize both the *List* and the *Details* view of the *Content list* widget.

For more information, see [Create custom views for the Content list widget](https://www.progress.com/documentation/sitefinity-cms/create-custom-views-for-the-content-list-widget).

## Extend the widget

> success **GITHUB EXAMPLE**: You can find examples on how to extend the Model, ViewModel, View, and the Entity classes as part of the Quantum demo sample in Sitefinity GitHub repository:
>
> * View model - [ExtendedContentDetailViewModel.cs](https://github.com/Sitefinity/sitefinity-aspnetcore-mvc-samples/blob/master/src/quantum/ViewModels/Extends/ExtendedContentDetailViewModel.cs)
> * Model - [ExtendedContentListModel.cs](https://github.com/Sitefinity/sitefinity-aspnetcore-mvc-samples/blob/master/src/quantum/Models/Extends/ExtendedContentListModel.cs)
> * Entity - [ExtendedContentListEntity.cs](https://github.com/Sitefinity/sitefinity-aspnetcore-mvc-samples/blob/master/src/quantum/Entities/Extends/ExtendedContentListEntity.cs)
> * View - [Details.Events.cshtml](https://github.com/Sitefinity/sitefinity-aspnetcore-mvc-samples/blob/master/src/quantum/Views/Shared/Components/SitefinityContentList/Details.Events.cshtml)

For more information, see [Extend the built-in widgets](https://www.progress.com/documentation/sitefinity-cms/extend-the-built-in-widgets).

## Exclude content types

### Extend ContentListEntity

In order to exclude content types form the content list widget, you need to inherit and extend the `ContentListEntity` class and add `TypeBlacklist` paramater to exlclude content types or add `Type` paramater to specify a list of allowed contet types.

For example:

```C#
using Progress.Sitefinity.AspNetCore;
using Progress.Sitefinity.AspNetCore.Widgets.Models.ContentList;
using Progress.Sitefinity.Renderer.Designers.Attributes;
using Progress.Sitefinity.Renderer.Entities.Content;

namespace SandboxWebApp.Entities
{
    /// <summary>
    /// Extended entity class for the ContentBlock view component.
    /// </summary>
    public class ExtendedContentListEntity : ContentListEntity
    {
        /// <inheritdoc />
        [ContentSection(Constants.ContentSectionTitles.SelectContentToDisplay, 0)]
        [Content(
            Type = $"{KnownContentTypes.ListItems}, {KnownContentTypes.News}",
            TypeBlacklist = "Telerik.Sitefinity.DynamicTypes.Model.PressReleases.Pressrelease"
        )]
        public override MixedContentContext SelectedItems
        {
            get
            {
                return base.SelectedItems;
            }
            set
            {
                base.SelectedItems = value;
            }
        }
    }
}

```

### Register the entity

Then you need to register the entity in the `Program.cs` file:

`builder.Services.AddSingleton<IEntityExtender, EntityExtender<ContentListEntity, SandboxWebApp.Entities.ExtendedContentListEntity>>();`
