Jump to:

23450 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Create a new page type

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

Page: 1
Go to End
Author Topic: 777 Views
  • Mianelle
    Avatar
    Community Member
    9 Posts

    Create a new page type Link to this post

    Hi folks,

    I am still stuck in creating a new Page Type. I have created a HomePage.php and saved it in mysite/code.
    I have http://localhost/silverstripe/index.php/dev/build?flush=1 where I click on build, thinking this is the way to re-build the database

    When I open the CMS my new php is shown in the top of the screen with the CMS navigation underneath. it looks weird, and I can not save it nor publish it. When I try to look at it in a browser it calls on the allready made template

    It drives me mad as I have been stuck for days so please please please, if anyone can help me, I will appreciate it big time

    Thank you very much

  • Mianelle
    Avatar
    Community Member
    9 Posts

    Re: Create a new page type Link to this post

    Furthermore, I have also put in the code

    <?php
    /**
    * Defines the HomePage page type
    */

    class HomePage extends Page {
    static $db = array(
    );
    static $has_one = array(
    );

    }

    class HomePage_Controller extends Page_Controller {

    }
    ?>

    in my php as suggested in the tutorial

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