Jump to:

5537 Posts in 1737 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Not show CMS menu

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

Page: 1
Go to End
Author Topic: 466 Views
  • Benas
    Avatar
    Community Member
    7 Posts

    Not show CMS menu Link to this post

    Hi!

    I`m making a modole and have problem with adding title to CMS menu.
    my _config.php code:

    <?php
    Object::addStaticVars('LeftAndMain', array(
       'extra_menu_items' => array(
          'Random Links' => 'admin/randomlinks/',
       )
    ));

    Director::addRules(100, array(
       'admin/randomlinks/$Action/$ID' => 'RandomLinksAdmin',
    ));

    Whats wrong?

    Thanks!

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Not show CMS menu Link to this post

    If your module needs to add another function to the menu it may be easier to just have it extend ModelAdmin as that automatically creates your top menu items
    http://doc.silverstripe.org/sapphire/en/reference/modeladmin

    unless you're not using this to actually manipulate a dataobject then you need to extend LeftAndMain and build out your custom interface
    http://doc.silverstripe.org/sapphire/en/reference/leftandmain

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