Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » ModelAdmin in the trunk?

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: 1469 Views
  • adiwidjaja
    Avatar
    Community Member
    14 Posts

    ModelAdmin in the trunk? Link to this post

    Hi all,

    I want to use the new ModelAdmin functionality. Are you sure it works in the trunk as sminnee describes in http://doc.silverstripe.com/doku.php?id=modeladmin ? Using the code on that page I end up with an empty screen on the url admin/catalog.

    Should I use the sapphire branch?

    Cheers,

    Andy

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: ModelAdmin in the trunk? Link to this post

    ModelAdmin is all on trunk. To make it work you need cms/ sapphire/ and jsparty/ all in the latest trunk releases. If you have a blank screen check your PHP error log on your server and see what the problem is

  • adiwidjaja
    Avatar
    Community Member
    14 Posts

    Re: ModelAdmin in the trunk? Link to this post

    Ok, I had a very stupid error in my code but there is also a very small error in the documentation, it should be:

    class MyCatalogAdmin extends ModelAdmin {

    protected static $managed_models = array(
    'Product'
    );

    }

    Without the "protected" it didn't work.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: ModelAdmin in the trunk? Link to this post

    you might like to update the documentation. Thanks for pointing this out!

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