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

dataobject or page?


Reply


4 Posts   1143 Views

Avatar
maryfran

Community Member, 12 Posts

17 December 2009 at 3:37pm

Hi!

I am not sure I completely understand databojects. I need to create a site that has products like an e-commerce site but does not sell them. I thought that they should be pages that then went into a holder page (such as in the second tutorial), but I would want several products from each category listed on a main products page.

But then I started reading and it seemed that maybe I want to create the products as data objects using modeladmin?

I am a wordpress convert, so sorry if I am just missing something obvious.

Avatar
Willr

Forum Moderator, 5513 Posts

17 December 2009 at 7:26pm

A page is a dataobject so anything you need to use with DataObjects you can do with Pages. The decision as to which is use is a matter of personal preference as you can usually build anything using either method. If you make something a 'Page' then its easily to see in the SiteTree in the CMS and makes it easy to move around / see the structure of the site. With dataobjects you won't 'see' them in the Site Tree and you'll have to setup a Admin interface (like ModelAdmin) to manage the objects rather then using the standard tree.

Avatar
maryfran

Community Member, 12 Posts

18 December 2009 at 4:50am

Thank you for clarifying. I was afraid I was going to get started and things were not going to work properly.

I think products will best be created as dataobjects and managed through the model admin then.

Avatar
amdayton

Community Member, 8 Posts

9 March 2010 at 2:18pm

Thanks, I also found this helpful. This is one of those things that didn't seem completely obvious coming to SS fresh...