Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Hiding Page types?


Go to End


2 Posts   2575 Views

Avatar
mapes911

Community Member, 12 Posts

11 December 2008 at 8:55pm

Hi all,

Is there a way to hide any of the built in page types from the "create" drop down?

Thanks!

Avatar
Blackdog

Community Member, 156 Posts

11 December 2008 at 11:20pm

Use this in your Page type model and replace PageType with your page type name.

function canCreate() {
return !DataObject::get_one("PageType");
}