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

Disable 'show in menus'


Go to End


2 Posts   3074 Views

Avatar
dio5

Community Member, 501 Posts

16 September 2007 at 9:05am

Hi,

I was wondering if it was possible to make 'show in menus?' unchecked as a standard for some subclasses of 'Page'... I can imagine it not being difficult by just doing it in the subclass, but I'm not really finding how in the documentation.

I'm gonna have a lot of subpages that I don't want to show up in the menu at all, but others on the same sublevel - with a different page type - have to show up.

Thanks.

Avatar
Ingo

Forum Moderator, 801 Posts

16 September 2007 at 12:08pm

you can use the $defaults-array for this:

class MyPage extends Page {
  static $defaults = array(
    'ShowInMenus' => false
  );
}