Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Problem adding new page type.

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

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

Page: 1
Go to End
Author Topic: 918 Views
  • Soumen
    Community Member
    7 Posts

    Problem adding new page type. Link to this post

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

  • Phalkunz
    69 Posts

    Re: Problem adding new page type. Link to this post

    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.

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.