Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

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

ModelAdmin and scaffolding on a Page (SiteTree) type


Go to End


2 Posts   1508 Views

Avatar
neros3

Community Member, 51 Posts

1 December 2011 at 11:10am

Hi there!

I was just wondering why ModelAdmin scaffolds all my fields nicely when the type is extended from DataObject and when I extend from SiteTree (or Page) I only get 3 "boring" fields and not all of them.

Is there a way to enable all fields without adding the fields manually via getCmsFields() ?

Also I just came across DataObjectManager - I feel that its somewhat down the same road of ModelAdmin. Are the usage of these two any different? Anyone deprecated og better suitet for certain purposes?

Thanks!

Avatar
swaiba

Forum Moderator, 1899 Posts

5 December 2011 at 5:40am

Hi neros3,

ModelAdmin is setup to scafold DataObject and even though SiteTree/Page is a subclass of that it doesn't do it eh? Not something I've ever needed, but it does annoy me when creating pages and it doesn't scaffold everything for me.

DOM is a community supported module by UncleCheese (see it's own forum area) it does several things that ModelAdmin does, but with the addition of SS3 it will no longer work as the "DataGrid" is coming. Of course best way to tell is to try 'em both out!

Barry