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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

DataObjects as Pages based on ModelAdmin


Reply


4 Posts   246 Views

Avatar
tahbit

Community Member, 24 Posts

21 May 2014 at 7:45pm

Hi - I have a problem that there must be a simple answer to. The problem is I have created an admin interface using ModelAdmin to create records and manage data. It's fab, does what I want it to do - GREAT!

I could have done a similar thing using pages and methods described in Tutorial 5 Relationship management. But that was not really the most efficient option for me. SO, now I have all this lovely data using the ModelAdmin interface it would be great to output it into some site pages so people can consume said data. I have followed the tutorials and know at a basic level how to create pages, custom page types etc - and yes the data relationship management tut makes sense but only takes you so far...

What I now need is a nudge to a resource that will help me translate the ModelAdmin data into pages. I have searched and searched the forum for solutions but all I have found is stuff that is years old and out of date - focusing on version 2 mostly.

Could anyone help point me in the right direction? Thanks! (I am sure the answer is blindingly obvious but I just cannot see it! :))

Avatar
camfindlay

Forum Moderator, 188 Posts

21 May 2014 at 8:12pm

This module might be of use if you want DataObjects to equate to pages. Otherwise you can just use the ORM/Data Model to call out these DataObjects via a Page_Controller method.

https://github.com/arambalakjian/DataObject-as-Page

Avatar
tahbit

Community Member, 24 Posts

22 May 2014 at 2:39am

Thanks so much for your prompt response - I'll have a look at both options and make a decision on the best outcome. BTW - I'm very impressed with the workflow of SS - I've used a few CMSs in my time and this is right up there!

Avatar
tahbit

Community Member, 24 Posts

23 May 2014 at 2:05am

Had a look at the DataObject to Pages module and it trashed my install so have opted for the DataObject PageController method and roll my own.

As I suspected - after you mentioned the latter option I realised the answer was right there in front of me - thanks for the tip - a real help.