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 /

Change Template in tutorial doesn't work - need help


Reply


3 Posts   2694 Views

Avatar
Toomanyidstakenalready

Community Member, 5 Posts

16 December 2008 at 12:12pm

I am a new user to Silverstripe.
I am walking through the tutorial.
I am at the section "Using a different template for the home page"
I have followed the code example to create a new template for my homepage and have tried to flush the database and the CMS so the "Page type" drop down list box on the "behaviour" tab will show my new template.
After repeated tries to flush both the database and CMS (which seem to do the flush) the new template doesn't show up in the drop down list box.

It seems as though I am not the first to have this problem so is there another way to create a template?

Avatar
Hamish

Community Member, 712 Posts

16 December 2008 at 12:27pm

Did you also create a new page type (ie, a new php file that lives in your /code/ directory) to use the template?

Avatar
Willr

Forum Moderator, 5513 Posts

16 December 2008 at 1:17pm

If SilverStripe is not 'finding' your PHP class then make sure its in the correct folder. It should be in 'mysite/code' or if you have /and are using a folder called tutorial then it should be in 'tutorial/code'