Jump to:

5453 Posts in 1674 Topics by 1198 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Page by default not visible in menus

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

Page: 1
Go to End
Author Topic: 1232 Views
  • markus85
    Avatar
    Community Member
    12 Posts

    Page by default not visible in menus Link to this post

    Hi out there,

    I hope you can help me and btw I hope I´m in the right forum :

    I want a custom page which is a subclass of page to be by default not visible in menu.
    There is a checkbox in the CMS called "Show in menus?" be deault this chebox is checked... but I don´t want that.

    I think there should be a variable such as

    static $is_visible_in_menus = false;

    is there such a variable?

    best regards

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Page by default not visible in menus Link to this post

    You can use the $defaults array.

    // mysite/code/Page.php

    static $defaults = array(
    'ShowInMenus' => false
    );

  • markus85
    Avatar
    Community Member
    12 Posts

    Re: Page by default not visible in menus Link to this post

    That´s exatly what I was looking for...

    thank you

    1232 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.