I read documentation but is not clear the difference between extends Page and extends DataObject when i create a new class.
If I create a new page type what I must use?
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.
extending Page is what you want.
when you extend Page, you get the stuff from DataObject.
I suggest you read this... http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
Page extends SiteTree which extends DataObject. So you get all the functionality of dataobjects in your Page objects with a ton of stuff from SiteTree http://api.silverstripe.org/2.4/cms/SiteTree.html sometimes this is useful (say for page types in the cms - where you want to extend page) and sometimes its not so useful (eg in this forum, each post is a dataobject since no need to 'create' it as a page).