Search code examples
c#content-management-systemepiserver

Is it possible to restrict an instance of a pagetype in EpiServer?


Under Start I want the user to only have the possibility to create one instance of my EmailTemplatePage pagetype. Is it possible?


Solution

  • A simple solution could be that you create the single page, and then set "Available in edit mode" to false on the page type. Then it will not be possible for editors to create another page (but they can still make a copy of the existing page).

    If your requirement is that an editor should be able to create just one page of a specific page type in a specific part of the page tree, you would need to create a custom validation when the page is saved.

    Something like this: https://blog.wsol.com/improving-episervers-content-editing-experience-through-validation