Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » New Module : Create custom LeftAndMains with PanelModelAdmin

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 3551 Views
  • OzziNL
    Avatar
    Community Member
    37 Posts

    Re: New Module : Create custom LeftAndMains with PanelModelAdmin Link to this post

    Hi Martijn,

    I use the CategoryMenuPanel as in your product admin example. What I noticed is that all categories are shown, but I have some canView() lines for that DataObject.

    So i added to line 37 of CategoryManager.php:

    if(!$rootObjectItem->canView()) continue;

    That works for me. Should it be added to code?

    But now it shows the ID of my Category instead of the name like your example.

    But I cannot do (the Category.Naam part):
          $this->addPanel('MenuPanel4', new CategoryMenuPanel('Products', 'open', array(
                'Category.Naam' => array('Product','OrderItem') // RootItems => ChildItems
             )
          ), 'MenuPanel');

    I cannot find a solution for this. Any idea?

    UPDATE: found it: had no Title field in the DataObject,

    Cheers,
    Oscar

  • iaogt
    Avatar
    Community Member
    1 Post

    Re: New Module : Create custom LeftAndMains with PanelModelAdmin Link to this post

    Excellent work ! I was wondering how to start extending LeftAndMain class. Thanks !

    3551 Views
Page: 1 2
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.