In order to make content editors' lives a lot easier, it's a good idea to restrict the pages that they can create.  This is done using the [AvailableContentType] attribute, on top of your page type definition, if you added the following code then content editors would only be allowed to create child pages of type start page... simple

In every Episerver website your navigation hierarchy will always start from the Root page:


As the root page is an Episerver system type by default, we can't apply the [AvailableContentType] attribute on it so content editors can create any page they want.  This can make life a bit nasty and I've personally seen a lot of navigation trees get very messy, very quickly.  Ideally, you want to limit the root page to have a start page, a container page and maybe a root page. 

Luckily there is a way to override the default root page and create our own ones. If you create a page called SysRoot that inherits from PageData, you inject your own property into the system root. To do this the code looks something like this:

That's it.. we have now restricted our pages :)


In today's guide we've talked about the benefits of the types of child pages content editors can create for a more usable back-end.  As the root page of any Episerver site is the beginning of the page hierarchy, then this is the page we need to do something to.  Luckily, Episerver provides a way to override the system behavior by creating a page called sysroot that implements page data