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.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Unable to add page type

Go to End

4 Posts   921 Views


Community Member, 3 Posts

6 March 2012 at 11:36am

I can't for the life of me add a new page type. I have followed the tutorial, searched the forum and I am still unable to have the page type show up in the behaviour tab.

I first create the php file, I name it Test.php.


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


class Test_Controller extends Page_Controller {

and then I create which is a copy of I flush silverstripe with ?flush=all, refresh the admin page, create a page, click the behaviour tab and to my disappointment I only see page, error page, redirect page and virtual page under page type.

Any assistance with this would be much appreciated.


Forum Moderator, 5523 Posts

6 March 2012 at 6:19pm

Have you rebuilt the database? Make sure your Test.php file is in your mysite folder.


Community Member, 18 Posts

6 March 2012 at 6:20pm



and you should be okay.


Community Member, 3 Posts

8 March 2012 at 8:47am

Thank you! It turns out it was my own stupidity, I wasn't typing /dev/ since I thought you was just the a common directory users use to devolop their SilverStripe site.