Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Remove/Hide Newsletters Tab in CMS

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: 1937 Views
  • Teng
    Avatar
    Community Member
    11 Posts

    Remove/Hide Newsletters Tab in CMS Link to this post

    Hi,

    I'm trying to hide the Newsletters section from view in the CMS itself, any idea's how to go about this?

  • Phalkunz
    Avatar
    69 Posts

    Re: Remove/Hide Newsletters Tab in CMS Link to this post

    LeftAndMain::remove_menu_item('newsletters');

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Remove/Hide Newsletters Tab in CMS Link to this post

    What Phalkunz suggested will only work on the trunk version of the code. If you are using 2.2.2 or any other stable release > 2.2.2 you have to do

    // Remove the option of 'Newsletters' in the CMS for SS <2.3
    Object::addStaticVars('LeftAndMain', array(
       'removed_menu_items' => array(
          'newsletter'
       )
    ));

    * Add this to your mysite/_config.php file FYI

    Just another example of why 2.3 is going to be nice as this way is a bit meh.

  • Teng
    Avatar
    Community Member
    11 Posts

    Re: Remove/Hide Newsletters Tab in CMS Link to this post

    Where would I put that? In my actual project? I'm just working off the tutorial currently and tried it in the page controller which it didn't seem to like, please forgive my nubness

  • Teng
    Avatar
    Community Member
    11 Posts

    Re: Remove/Hide Newsletters Tab in CMS Link to this post

    thanks willr worked great!

  • Phalkunz
    Avatar
    69 Posts

    Re: Remove/Hide Newsletters Tab in CMS Link to this post

    @will: I totally forgot about it thanks for correcting

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