Friday, February 24, 2012

Prevent pages from being created below a pagetype

Sometimes you may want to prevent editors from creating sub pages to specific page types. By default in EPiServer you can let the editor create all types of pages or just a select amount of page types below a page but you can't prevent the editor from creating any pages but with a small "hack" you can achieve this.

1. Create a new unused page type and mark it as unavailable in edit mode.
2. On the page type you don't want any sub pages on set the page type in step 1 as the only available page type.
3. Now no sub pages can be created in edit mode.