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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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   2937 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
  );
}