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.

Archive /

Our old forums are still available as a read-only archive.

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

Problem adding new page type.


Reply


2 Posts   956 Views

Avatar
Soumen

Community Member, 7 Posts

29 July 2008 at 6:21pm

I am new to silverstripe. I am trying to add new page type. I have created a page name HomePage.php and put it in tutorial/code directory.
The content of the page is as follows
<?php
class HomePage extends Page {
static $db = array(
);
static $has_one = array(
);
}
class HomePage_Controller extends Page_Controller {
}
?>
Actually getting it from the tutorial page.
When I rebuild the database it is not showing in the table list. So I am not getting the page type.

Avatar
Phalkunz

69 Posts

29 July 2008 at 11:19pm

In that case, there is no new tables created because there is no extra fields specified in the HomePage type.

If you don't see HomePage type in the create dropdown list, it can mean that you've chosen the wrong option at the beginning of the installation. There are 2 options. One is using tutorial and the other one is using blackcandy theme.