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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Don't seem to be able to create another pagetype/template despite following the tutorial???


Go to End


2 Posts   818 Views

Avatar
TF-35Lightning

Community Member, 137 Posts

24 March 2010 at 4:20pm

Hi all,

I'm running through the SS tutorial at
http://doc.silverstripe.org/doku.php?id=tutorial:1-building-a-basic-site

Trying to create a different page type that will allow me to have different versions of a template for specific pages.

Now I simply can not add to the page type drop down list under behaviour tab following the instructions from the tutorial.

Heres what I have done. (basically what the tutorials says to do but I can't get it to work).

created a file HomePage.php (containing)

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

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

}

class HomePage_Controller extends Page_Controller {

}
?>

and have it in the mysite/code directory

I ?flush1 the site, and have cleaned out the cache but still when I enter the admin there is no Homepage or any other new options to be seen fromt he Behaviour, page type drop down box.

Not sure what to do now.

Any help would be great

Avatar
TF-35Lightning

Community Member, 137 Posts

24 March 2010 at 4:23pm

I got it. I've just worked out that

/dev/build?flush=1

isnt like

/?flush=1

did the build flush and all is now good.