Page type restriction to root page



   I need to apply page type restriction to root page structure.My cms site page root structure look like this:

     - Root

        -The Table


             -Page 1

                -Page 2

                   -Page 3

I want to restrict Page 1,page 2 with same page type and page 3 with another page type.Is it possible to implement in cms.


May 06, 2016 16:41

You can restrict what page types are allowed to be created as children. Decorate your content type with

An example for root page 

[ContentType(GUID = "3415B788-8359-4BF0-9375-2FE9BA90719B",
             AvailableInEditMode = false)]
[AvailableContentTypes(Include = new[] {
public class SysRoot : PageData
Edited, May 06, 2016 17:02

Thanks for your help


May 26, 2016 15:44

This approach is not working in the current CMS version 11.

Does anybody knows how to accomplish this in version 11?

Jun 24, 2019 13:01
        GUID = "19671657-B684-4D95-A61F-8DD4FE60D559",
        GroupName = Global.GroupNames.Specialized)]
        Include = new[] { typeof(ContainerPage), typeof(ProductPage), typeof(StandardPage), typeof(ISearchPage), typeof(LandingPage), typeof(ContentFolder) }, // Pages we can create under the start page...
        ExcludeOn = new[] { typeof(ContainerPage), typeof(ProductPage), typeof(StandardPage), typeof(ISearchPage), typeof(LandingPage) })] // ...and underneath those we can't create additional start pages
public class StartPage : SitePageData

It's pretty similar. You get some options on the Availability flag to choose between including All, None or Specific. Choose specific and then set the Include to all pages types you want should be available under this page type. If you want to exclude this page type below some other page types, you can use the ExcludeOn property. Normally I only use the Include option...

Jun 24, 2019 13:33

Thanks for the reply, but that is restriction for the StartPage. I want to add a restriction to the Root page like is it show in the post above.

   I.e. Under the site's Root to be able to add only the StartPage and SettingsPage type. 

Jun 24, 2019 13:51
Jun 24, 2019 14:03

I saw that blog post too and that I used in my example and it's not working in CMS 11.

Thank you again for your assistance.

Jun 24, 2019 18:23

Hi Nenad,

The only way I believe you can do this for the Root is via the IAvailableSettingsRepository.

I've had success with the following previously:

public class RestrictRootPagesInitialization : IInitializableModule
    public void Initialize(InitializationEngine context)
        var contentTypeRepository = context.Locate.Advanced.GetInstance<IContentTypeRepository>();

        var sysRoot = contentTypeRepository.Load("SysRoot") as PageType;

        var setting = new AvailableSetting { Availability = Availability.Specific };

        var availableSettingsRepository = context.Locate.Advanced.GetInstance<IAvailableSettingsRepository>();
        availableSettingsRepository.RegisterSetting(sysRoot, setting);

    public void Uninitialize(InitializationEngine context)
Edited, Jun 24, 2019 18:52

Hi Jake, 

This works perfectly! Thanks a lot!!

Jun 25, 2019 10:06

Nice! I hadn't seen the IAvailableSettingsRepository interface before. That's good to know.

Jun 25, 2019 10:11
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.