Jump to:

23450 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » New homepage 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: 741 Views
  • dubh
    Community Member
    1 Post

    New homepage type Link to this post

    I have created a HomePage.php file in the mysite/code directory with the following code

    * Defines the HomePage page type

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


    class HomePage_Controller extends Page_Controller {

    However once I run the http://localhost/db/build?flush=1 and the database is changed I am unable to save and publish a page with the new HomePage type. When i click on the save and publish button I get "javascript Parse Error". Does anyone have any ideas?


  • Double-A-Ron
    Community Member
    604 Posts

    Re: New homepage type Link to this post

    I don't see a problem with that code at all.

    Are you sure your db/build/flush=1 added the correct data (lines in green)?

    You could also try clearing your cache.


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.