Although I agree that it would be a good feature it is possible to implement this rather easily.
You could subscribe to the CreatingPage event and check what page type name (or id) is used and abort the creation of the new page and supply a message to the editor in order to inform him/her of why creation was cancelled.
To limit which page types would be affected, you could either create a list of childless page types, or add a pre- or suffix to the page type name which would give you something to look for before aborting creation. I'd use the latter option as all control over page types could still be handled from the page types tab in admin mode.
I'd also suggest that you create a dummy page type as the only option for child pages as that would tell the editor that no children will be created, given that the dummy page type has a informative name.
Perhaps it would be possible to abort even sooner, say when trying to load the edit interface for the dummy page type. I'm not sure exactly how to to that or if it is possible. I'll have a quick look at it tomorrow.
edit:
As it turns out, this is possible to achive with EPiServer CMS 5. If you create a dummy page type and choose it not to be available in edit mode, you can then select the dummy as the only possible page type under the childless page type to disable the editors from creating children to the given page type.
If you'd like to build this functionality for EPiServer CMS 4.x, it would be easiest to subscribe to the LoadingDefaultPageData event and take it from there.
Hi,
I did short POC on that and managed to do it in quite simple way by modyfing NewPage.aspx (from edit folder). You can read how I did it here: http://blog.juszczyk.biz/2008/06/how-to-make-page-type-leaf.html
Regards,
Dominik
You could also look at a the plugin in CodeResort:
https://www.coderesort.com/p/epicode/wiki/EPiCodeNewPage
I have just come across this peculiar EPiServer idiosyncrasy. Quite why deselecting all of the check boxes is equivalent to selecting all of them i have no idea!
Does anyone know why this hasn't been changed over the last 5 years?
We know about this feature request perhaps it might even be included in the next release.
Any ideas if this will be fixed sometime soon? It's still not fixed in the latest version CMS 6 R2.
Regards
I'm pretty sure the ability to restrict any page type is available in the current "EPiServer 7 preview" release so it's possible to use this as soon as we get the release version out.
Can confirm this has been solved (tested in 9.12).
If the selected pagetype has no available pagetypes defined, you'll get the following behaviour:
1. There will be no "New page" in the page's context menu in the page tree
2. If you click the + icon (new page) in the global tool menu, a page selector dialog will appear, asking where you'd like to create the page.
a) If you select the current page (that has no available pagetypes), there will be nothing listed in the "suggested page types" list, so creating a page is impossible.
b) If you select another node in the page tree that allows any pagetypes, creating a page procedes as normal.