I want to have some page types that do not allow child pages. I would assume setting [AvailablePageTypes(Availability.None)] would achieve this but this does not appear to be the case, all page types are currently shown.

My model class begins with:

        DisplayName = "Article Page",
        GUID = "b6e7c4d6-5e29-4b8f-80a9-2ae79859c8ce",
        Description = "")]

    public class ArticlePage : SitePageData {


What am I doing wrong?

Aug 06, 2013 7:38

I am running patch 3 (well v 7.0.586.16, is this patch 3?)

Aug 06, 2013 7:39

I believe you still need to add a dummy page type to list in AvailablePageTypes(). On the dummy page type you set AvailableInEditMode = false.

Aug 06, 2013 9:17

I was wrong. [AvailablePageTypes(Availability.None)] works for me when I try it now. You probably have some kind of model sync problem.

Aug 06, 2013 19:11

Thanks Johan, in response to your comment, I created a new identical class and setting AvailablePageTypes(Availability.None) did work. After confirming this, I went into the Admin and in the Available Page Types tab for the pagetype, I selected "Use Default Settings" and it appeared to obtain the correct settings.

At no point had I changed this setting in the CMS.

Is there someway to force all pagetypes to reload from code?

Aug 07, 2013 1:19

We are planning to release a developer Addon with some tools for development/debugging which will include a way to view and reset types/properties that are not in sync with code.

But for now you could quite easily write e.g. a scheduled job that iterates over all types and all properties and call Reset on them. The code could look something like:

[ScheduledPlugIn(DisplayName = "Revert to model")]
public class ResetTypes
public static string Execute()
     return Execute(ServiceLocator.Current.GetInstance<IContentTypeRepository>(),

public static string Execute(IContentTypeRepository contentTypeRepository,
IPropertyDefinitionRepository propertyDefinitionRepository,
IAvailableSettingsRepository availableSettingsRepository)
foreach (var contentType in contentTypeRepository.List())

var writableType = contentType.CreateWritableClone() as ContentType;

foreach (var property in contentType.PropertyDefinitions)
var writableProp = property.CreateWritableClone();

return "All changes from admin mode reverted";


Aug 07, 2013 9:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.