Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Best Practices Extending SiteTree

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

Page: 1
Go to End
Author Topic: 252 Views
  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Best Practices Extending SiteTree Link to this post

    Just wondering if there any Best Practices in SS3.1 when adding DataExtensions to the base Page. Is it better to add the DataExtension to SiteTree or to Page?

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: Best Practices Extending SiteTree Link to this post

    I always add my DataExtension to Page. In the almost 3 years I've been developing with SS I've never created a new page type that extended SiteTree.

    not sure if there is a best practice but this what I've always done.

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: Best Practices Extending SiteTree Link to this post

    I'm thinking more in terms of adding features to the basic Page as opposed to creating new Page types. I was thinking doing it to SiteTree to save creating another an extra Table. If you add the DataExtentsion to Page it creates a Page Table for the new fields, but if you add it to SiteTree it just adds the extra fields to the SiteTree table. I figure that way it saves a DataBase call, and a table. But I was wondering if there's a conflict with any intended design patterns

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