XperienceCommunity.ContentTypeRestrictions 1.1.2

Additional Details

The functionality provided by this package has now been included in the core Xperience by Kentico platform. This package will no longer be supported as I recommend you move to use the built in functionality.

dotnet add package XperienceCommunity.ContentTypeRestrictions --version 1.1.2
                    
NuGet\Install-Package XperienceCommunity.ContentTypeRestrictions -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XperienceCommunity.ContentTypeRestrictions" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XperienceCommunity.ContentTypeRestrictions" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="XperienceCommunity.ContentTypeRestrictions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XperienceCommunity.ContentTypeRestrictions --version 1.1.2
                    
#r "nuget: XperienceCommunity.ContentTypeRestrictions, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=XperienceCommunity.ContentTypeRestrictions&version=1.1.2
                    
Install XperienceCommunity.ContentTypeRestrictions as a Cake Addin
#tool nuget:?package=XperienceCommunity.ContentTypeRestrictions&version=1.1.2
                    
Install XperienceCommunity.ContentTypeRestrictions as a Cake Tool

[!WARNING]

With the release of the Feb 2025 refresh, this functionality of this package has now been replaced with core features available directly within Xperience by Kentico. To that end, this package will no longer be supported and will instead be intended to be replaced with the core functionality.

See https://community.kentico.com/blog/xperience-by-kentico-refresh-february-20-2025#allowed-web-page-content-types-and-scopes for more information on the feature release.

To assist you with migrating your data from this plugin, I have included a script below. Note that this script is provided for general use and may need to be modified based on how your specific instance of XbyK is setup.

insert into CMS_WebPageScope (WebPageScopeWebsiteChannelID, WebPageScopeWebPageItemID, WebPageScopeIncludeChildren, WebPageScopeGUID)
select		WebsiteChannelID, null, 0, newid()
from		CMS_WebsiteChannel wc
left join	CMS_WebPageScope wps on wc.WebsiteChannelID = wps.WebPageScopeWebsiteChannelID
where		wps.WebPageScopeWebsiteChannelID is null

insert into CMS_WebPageScopeContentType (WebPageScopeContentTypeWebPageScopeID, WebPageScopeContentTypeContentTypeID)
select		WebPageScopeID, ContentTypeConfigurationContentTypeId
from		CMS_WebPageScope
cross join	BQCTR_ContentTypeConfiguration 
where		ContentTypeConfigurationAllowAtRoot = 1

insert into CMS_AllowedChildContentType (AllowedChildContentTypeParentID, AllowedChildContentTypeChildID)
select		distinct ctc.ContentTypeConfigurationContentTypeId, ctat.ContentTypeAllowedTypeContentTypeId
from		BQCTR_ContentTypeAllowedType ctat
inner join	BQCTR_ContentTypeConfiguration ctc on ctat.ContentTypeAllowedTypeContentTypeConfigurationId = ctc.ContentTypeConfigurationId

Xperience Community: Content Type Restrictions

Description

This package provides Xperience by Kentico administrators with an interface to restrict allowed content types within the content trees of a website channel. This package is intended to reduce allow control over what content types are available in order to guide editors towards the correct options when structuring site content.

Xperience by Content Type Restrictions

Requirements

Library Version Matrix

Xperience Version Library Version
>= 29.5.3 1.0.0

Dependencies

Package Installation

Add the package to your application using the .NET CLI

dotnet add package XperienceCommunity.ContentTypeRestrictions

or via the Package Manager

Install-Package XperienceCommunity.ContentTypeRestrictions

Quick Start

  1. Install the NuGet package.

  2. Update your Program.cs to register the necessary services.

    using XperienceCommunity.ContentTypeRestrictions;

    ...

    builder.Services.AddContentTypeRestrictionsExtensionServices();

Full Instructions

  1. Start your Xperience by Kentico website.

  2. Log in to the administration site.

  3. Edit a content type.

  4. Select whether the content type is allowed at the root level and what child types are allowed under this content type. Xperience by Content Type Restrictions

  5. When creating a new page in the website channel, the available content types will be restricted to only the specified allowed types. Xperience by Content Type Restrictions

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.