Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Disable 'show in menus'

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

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

Page: 1
Go to End
Author Topic: 2230 Views
  • dio5
    Avatar
    Community Member
    501 Posts

    Disable 'show in menus' Link to this post

    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.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Disable 'show in menus' Link to this post

    you can use the $defaults-array for this:

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

    2230 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.