Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » data object and page model - are they coupled?

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

Page: 1
Go to End
Author Topic: 999 Views
  • tallrobphilp
    Avatar
    Community Member
    9 Posts

    data object and page model - are they coupled? Link to this post

    I apologise for cross-posting as I posted something similar in "general questions" but I realise now that was probably the wrong place.

    I have basically had a look through the getting started tutorials and they are very good, but I have a big conceptual block that is stopping me from diving in head first with this framework and cms.

    Basically the tutorial parts 1-5 seem to imply that the data model and the page model are closely coupled. What I want is to be able to buikd a data model with entities, relationships etc and expose the editing of objects within this model to my site "editors" or "admins". I then want to be able to develop my site structure independently from this model, and query the model as I see fit in order to get the data and use it to populate templates to generate a site.

    I have had a look around the documentation and it seems like I should be able to do this (there is clearly a powerful data modelling layer here), but I cannot quite piece it together in my head just yet.

    Is this functionality in the core, or do I need some extra modules/plugins to be able to cleanly seperate the editing of the data in the model and then the generation of a site?

    Many thanks in advance, I hope this isn't one of those annoying newbie questions!!

  • tallrobphilp
    Avatar
    Community Member
    9 Posts

    Re: data object and page model - are they coupled? Link to this post

    I think I've stumbled upon the documentation that answers these questions.

    http://doc.silverstripe.org/sapphire/en/reference/modeladmin

    The ModelAdmin seems to be what will allow me to customise the CMS and allow users to edit the data in the model, rather than just pages.

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: data object and page model - are they coupled? Link to this post

    Each of your models or pages are completely independent (apart from when you start adding relationships). Tutorial 5 also focuses solely on DataObjects and not Pages in specifics but in actual fact pages are dataobjects, just layered with a rich version history and display options so they act like 'pages'. Everything you need to store in the database is a dataobject one way or another.

    ModelAdmin is a great tool for managing datamodels and relationships. If you want more docs about how you can make DataObjects 'act' more like pages (which in turn my explain what the differences are) SSbits has a good tutorial - http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-1-keeping-it-simple/

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